]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: disable clang warning in parser yacc output
authorMark Stapp <mjs@cisco.com>
Wed, 16 Apr 2025 15:37:33 +0000 (11:37 -0400)
committerMark Stapp <mjs@cisco.com>
Wed, 16 Apr 2025 17:50:21 +0000 (13:50 -0400)
Disable a clang 'unused' warning in the yacc source
of command_parse.c.

Signed-off-by: Mark Stapp <mjs@cisco.com>
lib/command_parse.y

index 8867e98ccc79069a62795d1e56563b5c8254dde6..6758aed14284abfe16127d3c95d140085518277c 100644 (file)
   ctx->docstr_start = ctx->docstr;
 }
 
+%{
+#ifdef __clang__
+# if __clang_major__ > 12
+#  pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+# endif
+#endif
+%}
+
 %%
 
 start: