aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-12-14 23:44:25 +0000
committerGerald Combs <gerald@wireshark.org>2013-12-14 23:44:25 +0000
commit465e4664de8e9a03add62fbbfd8eb97af3bab958 (patch)
tree6e825137033d4c5f662423ed5d131ffc86e08943
parent62d05c80ff2e1cda33556fce3bc528cb53550142 (diff)
Use "(void) <variable/>" to avoid unused variable warnings similar to
Qt's Q_UNUSED macro. svn path=/trunk/; revision=54110
-rw-r--r--epan/dfilter/grammar.lemon5
-rw-r--r--epan/dtd_grammar.lemon3
-rw-r--r--plugins/mate/mate_grammar.lemon5
3 files changed, 10 insertions, 3 deletions
diff --git a/epan/dfilter/grammar.lemon b/epan/dfilter/grammar.lemon
index 725b167890..90d0f679ba 100644
--- a/epan/dfilter/grammar.lemon
+++ b/epan/dfilter/grammar.lemon
@@ -28,7 +28,10 @@
/* Terminal and Non-Terminal types and destructors */
%token_type {stnode_t*}
-%token_destructor {stnode_free($$);}
+%token_destructor {
+ (void) dfw; /* Mark unused, similar to Q_UNUSED */
+ stnode_free($$);
+}
%type sentence {stnode_t*}
diff --git a/epan/dtd_grammar.lemon b/epan/dtd_grammar.lemon
index 393157f117..b3cb2fd42b 100644
--- a/epan/dtd_grammar.lemon
+++ b/epan/dtd_grammar.lemon
@@ -61,7 +61,8 @@ static GPtrArray* g_ptr_array_join(GPtrArray* a, GPtrArray* b){
%extra_argument { dtd_build_data_t *bd }
-%token_destructor {
+%token_destructor {
+ (void) bd; /* Mark unused, similar to Q_UNUSED */
if ($$) {
if ($$->text) g_free($$->text);
if ($$->location) g_free($$->location);
diff --git a/plugins/mate/mate_grammar.lemon b/plugins/mate/mate_grammar.lemon
index fdda2f22f6..f190014e60 100644
--- a/plugins/mate/mate_grammar.lemon
+++ b/plugins/mate/mate_grammar.lemon
@@ -178,7 +178,10 @@ static gchar* recolonize(mate_config* mc, gchar* s) {
%token_prefix TOKEN_
%token_type { gchar* }
-%token_destructor { if ($$) g_free($$); }
+%token_destructor {
+ (void) mc; /* Mark unused, similar to Q_UNUSED */
+ if ($$) g_free($$);
+}
%extra_argument { mate_config* mc }