S_tokereport's unused parm
Andy Lester [Mon, 31 Oct 2005 00:04:59 +0000 (18:04 -0600)]
Message-ID: <20051031060459.GC10767@petdance.com>

p4raw-id: //depot/perl@25914

embed.fnc
embed.h
proto.h
toke.c

index a2e8eb3..de28479 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1321,7 +1321,7 @@ sR        |char * |tokenize_use   |int|NN char*
 s      |SV*    |new_constant   |NULLOK const char *s|STRLEN len|NN const char *key|NN SV *sv \
                                |NULLOK SV *pv|NULLOK const char *type
 #  if defined(DEBUGGING)
-s      |int    |tokereport     |NN const char *s|I32 rv
+s      |int    |tokereport     |I32 rv
 #  endif
 s      |int    |ao             |int toketype
 s      |void   |depcom
diff --git a/embed.h b/embed.h
index aa85b16..bc51e88 100644 (file)
--- a/embed.h
+++ b/embed.h
 #endif
 #  if defined(DEBUGGING)
 #ifdef PERL_CORE
-#define tokereport(a,b)                S_tokereport(aTHX_ a,b)
+#define tokereport(a)          S_tokereport(aTHX_ a)
 #endif
 #  endif
 #ifdef PERL_CORE
diff --git a/proto.h b/proto.h
index fe65757..3aa73de 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -3697,9 +3697,7 @@ STATIC SV*        S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, SV *
                        __attribute__nonnull__(pTHX_4);
 
 #  if defined(DEBUGGING)
-STATIC int     S_tokereport(pTHX_ const char *s, I32 rv)
-                       __attribute__nonnull__(pTHX_1);
-
+STATIC int     S_tokereport(pTHX_ I32 rv);
 #  endif
 STATIC int     S_ao(pTHX_ int toketype);
 STATIC void    S_depcom(pTHX);
diff --git a/toke.c b/toke.c
index 287aa94..11d5b2f 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -141,7 +141,7 @@ static const char* const lex_state_names[] = {
  */
 
 #ifdef DEBUGGING /* Serve -DT. */
-#   define REPORT(retval) tokereport(s,(int)retval)
+#   define REPORT(retval) tokereport((I32)retval)
 #else
 #   define REPORT(retval) (retval)
 #endif
@@ -282,7 +282,7 @@ static struct debug_tokens { const int token, type; const char *name; }
 /* dump the returned token in rv, plus any optional arg in yylval */
 
 STATIC int
-S_tokereport(pTHX_ const char* s, I32 rv)
+S_tokereport(pTHX_ I32 rv)
 {
     if (DEBUG_T_TEST) {
        const char *name = Nullch;