toke.c/MAD: silence a couple of warnings
authorDavid Mitchell <davem@iabyn.com>
Thu, 9 May 2013 10:19:32 +0000 (11:19 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 9 May 2013 10:19:32 +0000 (11:19 +0100)
A couple of vars are set but not used under -Dmad.
The easiest way to silence the warnings is to use PERL_UNUSED_VAR()
rather than try to #ifdef away all the places the vars appear under mad.

toke.c

diff --git a/toke.c b/toke.c
index 08e9c4d..f1d09ef 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -8563,6 +8563,7 @@ Perl_yylex(pTHX)
 #ifdef PERL_MAD
                    PL_thistoken = subtoken;
                    s = d;
+                    PERL_UNUSED_VAR(tboffset);
 #else
                    if (have_name)
                        (void) force_word(PL_oldbufptr + tboffset, WORD,
@@ -8685,6 +8686,7 @@ Perl_yylex(pTHX)
                force_next(0);
 
                PL_thistoken = subtoken;
+                PERL_UNUSED_VAR(have_proto);
 #else
                if (have_proto) {
                    NEXTVAL_NEXTTOKE.opval =