summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlestes <wlestes>2012-02-03 21:29:26 +0000
committerwlestes <wlestes>2012-02-03 21:29:26 +0000
commitf27ce29612ffb818a89e4dd5ae65a11631f3751a (patch)
tree7eb3f62ab113807061ca4393c55e8a02c7c79b5e
parent600c40922b2b12f63657289aafb08154d418afe1 (diff)
downloadflex-f27ce29612ffb818a89e4dd5ae65a11631f3751a.tar.gz
suppress warning on unused yyguts_t
-rw-r--r--flex.skl4
1 files changed, 4 insertions, 0 deletions
diff --git a/flex.skl b/flex.skl
index 7b4127b..b5ba1c2 100644
--- a/flex.skl
+++ b/flex.skl
@@ -288,6 +288,8 @@ typedef void* yyscan_t;
%# Declare yyguts variable
m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]])
+%# Perform a noop access on yyguts to prevent unused variable complains
+m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[(void)yyg]])
%# For use wherever a Global is accessed or assigned.
m4_define( [[YY_G]], [[yyg->$1]])
@@ -345,6 +347,7 @@ m4_define( [[M4_YY_INCR_LINENO]],
%# Define these macros to be no-ops.
m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]])
+m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[m4_dnl]])
m4_define( [[YY_G]], [[($1)]])
m4_define( [[M4_YY_PROTO_LAST_ARG]])
m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[void]])
@@ -1764,6 +1767,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */
%% [17.0] code to find the next state, and perhaps do backing up, goes here
+ M4_YY_NOOP_GUTS_VAR();
return yy_is_jam ? 0 : yy_current_state;
}