Skip to content

Commit

Permalink
build: suppress "-Wno-unused-but-set-variable" when building grammar
Browse files Browse the repository at this point in the history
bison/flex generates rather ugly C code. Need to suppress this warning.

    lib/route/cls/ematch_syntax.c:1368:9: error: variable 'ematch_nerrs' set but not used [-Werror,-Wunused-but-set-variable]
     1368 |     int yynerrs = 0;
          |         ^
    lib/route/cls/ematch_syntax.c:72:25: note: expanded from macro 'yynerrs'
       72 | #define yynerrs         ematch_nerrs
          |                         ^
    1 error generated.

Had one job.
  • Loading branch information
thom311 committed Jan 12, 2025
1 parent c5562f4 commit 40b0c16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ nodist_lib_route_libnl_grammar_la_SOURCES = \
lib_route_libnl_grammar_la_CPPFLAGS = \
$(lib_cppflags) \
-I$(srcdir)/lib/route \
-Wno-unused-but-set-variable \
$(NULL)

$(lib_route_libnl_grammar_la_OBJECTS): $(grammar_files_headers)
Expand Down

0 comments on commit 40b0c16

Please sign in to comment.