Linux Netfilter development
 help / color / mirror / Atom feed
* [nft PATCH 1/2] parser_bison: Get rid of (most) bison compiler warnings
@ 2019-07-20 18:52 Phil Sutter
  2019-07-20 18:52 ` [nft PATCH 2/2] nfnl_osf: Silence string truncation gcc warnings Phil Sutter
  2019-07-20 19:43 ` [nft PATCH 1/2] parser_bison: Get rid of (most) bison compiler warnings Florian Westphal
  0 siblings, 2 replies; 8+ messages in thread
From: Phil Sutter @ 2019-07-20 18:52 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

Shut the complaints about POSIX incompatibility by passing -Wno-yacc to
bison. An alternative would be to not pass -y, but that caused seemingly
unsolveable problems with automake and expected file names.

Fix two warnings about deprecated '%pure-parser' and '%error-verbose'
statements by replacing them with what bison suggests.

A third warning sadly left in place: Replacing '%name-prefix' by what
is suggested leads to compilation errors.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/Makefile.am    | 2 +-
 src/parser_bison.y | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index e2b531390cefb..740c21f2cac85 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,7 @@ AM_CFLAGS = -Wall								\
 	    -Waggregate-return -Wunused -Wwrite-strings ${GCC_FVISIBILITY_HIDDEN}
 
 
-AM_YFLAGS = -d
+AM_YFLAGS = -d -Wno-yacc
 
 BUILT_SOURCES = parser_bison.h
 
diff --git a/src/parser_bison.y b/src/parser_bison.y
index c90de47e88f74..12e499b4dd025 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -116,12 +116,12 @@ int nft_lex(void *, void *, void *);
 
 %name-prefix "nft_"
 %debug
-%pure-parser
+%define api.pure
 %parse-param		{ struct nft_ctx *nft }
 %parse-param		{ void *scanner }
 %parse-param		{ struct parser_state *state }
 %lex-param		{ scanner }
-%error-verbose
+%define parse.error verbose
 %locations
 
 %initial-action {
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-21 11:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-20 18:52 [nft PATCH 1/2] parser_bison: Get rid of (most) bison compiler warnings Phil Sutter
2019-07-20 18:52 ` [nft PATCH 2/2] nfnl_osf: Silence string truncation gcc warnings Phil Sutter
2019-07-20 19:36   ` Florian Westphal
2019-07-20 20:22     ` Phil Sutter
2019-07-21 11:15   ` Fernando Fernandez Mancera
2019-07-21 11:29     ` Phil Sutter
2019-07-20 19:43 ` [nft PATCH 1/2] parser_bison: Get rid of (most) bison compiler warnings Florian Westphal
2019-07-20 20:13   ` Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox