From b56f53884be3bab935058b2bbbb4da0b8bbbe7f6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 5 Dec 2015 01:49:22 -0800 Subject: Build Flex-generated files with "warnings are errors". We shouldn't be getting warnings at this point. Change-Id: I363a48546cb8d916425f42962ae1697d52ed9a29 Reviewed-on: https://code.wireshark.org/review/12436 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dfilter/Makefile.am | 24 +++++++----------------- epan/dfilter/Makefile.nmake | 8 ++------ 2 files changed, 9 insertions(+), 23 deletions(-) (limited to 'epan/dfilter') diff --git a/epan/dfilter/Makefile.am b/epan/dfilter/Makefile.am index 7db0fa2b46..b89c44cc8c 100644 --- a/epan/dfilter/Makefile.am +++ b/epan/dfilter/Makefile.am @@ -22,18 +22,16 @@ include ../../Makefile.am.inc if HAVE_WARNINGS_AS_ERRORS -AM_NON_GENERATED_CFLAGS = -Werror +AM_CFLAGS = -Werror endif include Makefile.common -noinst_LTLIBRARIES = libdfilter_generated.la libdfilter.la +noinst_LTLIBRARIES = libdfilter.la CLEANFILES = \ libdfilter.a \ libdfilter.la \ - libdfilter_generated.a \ - libdfilter_generated.la \ *~ DISTCLEANFILES = \ @@ -47,24 +45,16 @@ MAINTAINERCLEANFILES = \ AM_CPPFLAGS = -I$(srcdir)/../.. -I$(srcdir)/.. -I$(srcdir)/$(LEMON) -#Since code generated by lex may trigger gcc warnings, we are now generating two -#libraries. A single library is generated with the lex code without the barrier -#"stop on warning". An other library is generated from the remaining source -#files with the "stop on warning" barrier. -libdfilter_la_SOURCES = $(NONGENERATED_C_FILES) $(NONGENERATED_HEADER_FILES) -libdfilter_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS) - -libdfilter_generated_la_SOURCES = \ - $(GENERATED_C_FILES) \ +libdfilter_la_SOURCES = \ + $(NONGENERATED_C_FILES) \ + $(NONGENERATED_HEADER_FILES) \ + $(GENERATED_C_FILES) \ $(GENERATED_HEADER_FILES) -nodist_libdfilter_generated_la_SOURCES = \ +nodist_libdfilter_la_SOURCES = \ $(NODIST_GENERATED_C_FILES) \ $(NODIST_GENERATED_HEADER_FILES) -libdfilter_la_LIBADD = libdfilter_generated.la -libdfilter_la_DEPENDENCIES = libdfilter_generated.la - EXTRA_DIST = \ $(GENERATOR_FILES) \ Makefile.common \ diff --git a/epan/dfilter/Makefile.nmake b/epan/dfilter/Makefile.nmake index 3045e2e6b0..1a7b7f0154 100644 --- a/epan/dfilter/Makefile.nmake +++ b/epan/dfilter/Makefile.nmake @@ -9,16 +9,12 @@ include Makefile.common LEMON=..\..\tools\lemon -# We GENERATED_CFLAGS to get around flex's non-LLP64-compliant output -GENERATED_CFLAGS=\ - $(STANDARD_CFLAGS) \ +CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ /I. /I.. /I..\.. $(GLIB_CFLAGS) \ /I$(LEMON) \ /I$(PCAP_DIR)\include \ -DWS_BUILD_DLL -CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS) - .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< @@ -62,7 +58,7 @@ RUNLEX=../../tools/runlex.sh scanner_lex.h : scanner.c scanner.obj : scanner.c grammar.h - $(CC) $(GENERATED_CFLAGS) -Fd.\ -c scanner.c + $(CC) $(CFLAGS) -Fd.\ -c scanner.c scanner.c: grammar.h -- cgit v1.2.3