summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-12-17 14:53:11 +0000
committerDavid Mitchell <davem@iabyn.com>2012-12-17 14:53:11 +0000
commitcb65b68777357c80fe35f4b74d7ac36c7b471b66 (patch)
tree840469897e12676bc4a63decac9b832767bb0721
parent4800031444245dc3dac9967b46b4860ff3863d32 (diff)
downloadperl-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.c7
-rw-r--r--regcomp.h4
-rw-r--r--regexec.c3
3 files changed, 9 insertions, 5 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index cd5033f6aa..199df1fe3c 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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*);
diff --git a/regcomp.h b/regcomp.h
index 4e05a9f380..dc4dede3f2 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -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 = \
diff --git a/regexec.c b/regexec.c
index 0d378b2a76..cd9e5550a1 100644
--- a/regexec.c
+++ b/regexec.c
@@ -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); \