diff options
author | David Mitchell <davem@iabyn.com> | 2012-12-17 14:53:11 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-12-17 14:53:11 +0000 |
commit | cb65b68777357c80fe35f4b74d7ac36c7b471b66 (patch) | |
tree | 840469897e12676bc4a63decac9b832767bb0721 | |
parent | 4800031444245dc3dac9967b46b4860ff3863d32 (diff) | |
download | perl-cb65b68777357c80fe35f4b74d7ac36c7b471b66.tar.gz |
use PERL_UNUSED_VAR rather than PERL_UNUSED_DECL
PERL_UNUSED_DECL doesn't do anything under g++, so doing this silences
some g++ warnings.
-rw-r--r-- | pp_ctl.c | 7 | ||||
-rw-r--r-- | regcomp.h | 4 | ||||
-rw-r--r-- | regexec.c | 3 |
3 files changed, 9 insertions, 5 deletions
@@ -2867,11 +2867,14 @@ PP(pp_goto) SAVEFREESV(cv); /* later, undo the 'avoid premature free' hack */ if (CvISXSUB(cv)) { OP* const retop = cx->blk_sub.retop; - SV **newsp PERL_UNUSED_DECL; - I32 gimme PERL_UNUSED_DECL; + SV **newsp; + I32 gimme; const SSize_t items = AvFILLp(arg) + 1; SV** mark; + PERL_UNUSED_VAR(newsp); + PERL_UNUSED_VAR(gimme); + /* put GvAV(defgv) back onto stack */ EXTEND(SP, items+1); /* @_ could have been extended. */ Copy(AvARRAY(arg), SP + 1, items, SV*); @@ -862,8 +862,8 @@ re.pm, especially to the documentation. #ifdef DEBUGGING -#define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags \ - PERL_UNUSED_DECL = 0; GET_RE_DEBUG_FLAGS; +#define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags = 0; \ + PERL_UNUSED_VAR(re_debug_flags); GET_RE_DEBUG_FLAGS; #define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) \ const char * const rpv = \ @@ -156,7 +156,8 @@ static const char* const non_utf8_target_but_utf8_required /* Doesn't do an assert to verify that is correct */ #define LOAD_UTF8_CHARCLASS_NO_CHECK(class) STMT_START { \ if (!CAT2(PL_utf8_,class)) { \ - bool throw_away PERL_UNUSED_DECL; \ + bool throw_away; \ + PERL_UNUSED_VAR(throw_away); \ ENTER; save_re_context(); \ throw_away = CAT2(is_utf8_,class)((const U8*)" "); \ PERL_UNUSED_VAR(throw_away); \ |