summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2017-11-14 21:17:10 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-11-16 14:35:35 +0100
commit90417cc148e01b746957dbcf375daa3378a50c58 (patch)
treeb149997074b13e715766fc2a7713c392d1ddef0b /src/parser_bison.y
parent9200bfc50653612033d58774f422fc20150d3301 (diff)
libnftables: Split code into frontend and library
This finally creates the libnftables shared object. For some reason, this causes two compiler warnings to appear: | parser_bison.y: In function 'nft_parse': | parser_bison.y:131:3: warning: implicit declaration of function 'nft_set_debug' [-Wimplicit-function-declaration] | nft_set_debug(1, scanner); | ^~~~~~~~~~~~~ | parser_bison.c:64:25: warning: implicit declaration of function 'nft_lex' [-Wimplicit-function-declaration] | #define yylex nft_lex | ^ | parser_bison.c:4745:16: note: in expansion of macro 'yylex' | yychar = yylex (&yylval, &yylloc, scanner); So this patch contains a workaround, namely declaring both functions in src/parser_bison.y. During linking the objects are found, so this is rather a matter of cosmetics. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 2c59fa78..c64c3979 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -105,6 +105,10 @@ static void location_update(struct location *loc, struct location *rhs, int n)
#define symbol_value(loc, str) \
symbol_expr_alloc(loc, SYMBOL_VALUE, current_scope(state), str)
+
+/* Declare those here to avoid compiler warnings */
+void nft_set_debug(int, void *);
+int nft_lex(void *, void *, void *);
%}
/* Declaration section */