From: Nicholas Clark Date: Mon, 12 Oct 2009 17:48:38 +0000 (+0100) Subject: ckWARNreg() and ckWARNregdep() now use string concatenation, like their brethren X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f10f4c183a00badad8742a2a435477ad8cd8c6ee;p=p5sagit%2Fp5-mst-13.2.git ckWARNreg() and ckWARNregdep() now use string concatenation, like their brethren They had been concatenating "%s" REPORT_LOCATION, as they weren't passing in a format string, which wasn't consistent with the 2-5 argument versions. None of the strings passed in have % characters in them, so this is safe (and any static analyser will be able to see this). --- diff --git a/regcomp.c b/regcomp.c index 148c88a..0f5f81d 100644 --- a/regcomp.c +++ b/regcomp.c @@ -477,15 +477,15 @@ static const scan_data_t zero_scan_data = #define ckWARNreg(loc,m) STMT_START { \ const IV offset = loc - RExC_precomp; \ - Perl_ck_warner(aTHX_ packWARN(WARN_REGEXP), "%s" REPORT_LOCATION, \ - m, (int)offset, RExC_precomp, RExC_precomp + offset); \ + Perl_ck_warner(aTHX_ packWARN(WARN_REGEXP), m REPORT_LOCATION, \ + (int)offset, RExC_precomp, RExC_precomp + offset); \ } STMT_END #define ckWARNregdep(loc,m) STMT_START { \ const IV offset = loc - RExC_precomp; \ Perl_ck_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_REGEXP), \ - "%s" REPORT_LOCATION, \ - m, (int)offset, RExC_precomp, RExC_precomp + offset); \ + m REPORT_LOCATION, \ + (int)offset, RExC_precomp, RExC_precomp + offset); \ } STMT_END #define ckWARN2reg(loc, m, a1) STMT_START { \