From: Omar Sandoval <osan...@fb.com>

elfutils is compiled with -Wimplicit-fallthrough=5, so the fallthrough
comment in i386_lex.c (generated by flex) doesn't prevent the implicit
fallthrough warning. Add -Wno-implicit-fallthrough to i386_lex_CFLAGS.

Signed-off-by: Omar Sandoval <osan...@fb.com>
---
 libcpu/ChangeLog   | 4 ++++
 libcpu/Makefile.am | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index 52567be8..70796514 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,3 +1,7 @@
+2019-12-11  Omar Sandoval  <osan...@fb.com>
+
+       * Makefile.am (i386_lex_CFLAGS): Add -Wno-implicit-fallthrough.
+
 2019-10-17  Mark Wielaard  <m...@klomp.org>
 
        * i386_data.h (FCT_sel): Check for param_start + 2 >= end instead
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
index 03c71ea3..59def7d1 100644
--- a/libcpu/Makefile.am
+++ b/libcpu/Makefile.am
@@ -81,7 +81,8 @@ i386_lex_no_Werror = yes
 
 libeu = ../lib/libeu.a
 
-i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare
+i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare \
+                 -Wno-implicit-fallthrough
 i386_parse.o: i386_parse.c i386.mnemonics
 i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`"
 i386_lex.o: i386_parse.h
-- 
2.24.0

Reply via email to