Warnings: add AM_CFLAGS also for the psppire build
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 24 Aug 2020 18:07:21 +0000 (20:07 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 24 Aug 2020 18:07:21 +0000 (20:07 +0200)
With the new setup the psppire and glade build honours the
AM_CFLAGS setup. This includes the Wextra warnings which
show some more warnings. The two checks which are disabled are

-Wno-sign-compare     : disabled also for core pspp
-Wno-unused-parameter : many callbacks result in unused parameters

Makefile.am
src/ui/gui/automake.mk

index 3f4a9c6250a943e6e2b41d5c829ef31e91777895..59834123ac4bbbefe737d28fbdb8a59be38e5d5a 100644 (file)
@@ -32,7 +32,7 @@ AM_V_P ?= :
 AM_CFLAGS=
 
 if cc_is_gcc
-AM_CFLAGS+=-Wall -W -Wwrite-strings -Wstrict-prototypes \
+AM_CFLAGS+=-Wall -Wextra -Wwrite-strings -Wstrict-prototypes \
 -Wpointer-arith -Wno-sign-compare -Wmissing-prototypes
 endif
 
index 02674bd27980fe1aa5b4f9f787290f9e91bde23c..0abce32b3e19be3ee7caa398eaed66c530b1e1a3 100644 (file)
@@ -92,8 +92,13 @@ if HAVE_GUI
 bin_PROGRAMS += src/ui/gui/psppire
 noinst_PROGRAMS += src/ui/gui/spreadsheet-test
 
-src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) $(SPREAD_SHEET_WIDGET_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
-src_ui_gui_spreadsheet_test_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
+src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) $(SPREAD_SHEET_WIDGET_CFLAGS) $(AM_CFLAGS) -DGDK_MULTIHEAD_SAFE=1
+src_ui_gui_spreadsheet_test_CFLAGS = $(GTK_CFLAGS) $(AM_CFLAGS) -DGDK_MULTIHEAD_SAFE=1
+
+if cc_is_gcc
+src_ui_gui_psppire_CFLAGS+=-Wno-unused-parameter
+src_ui_gui_spreadsheet_test_CFLAGS+=-Wno-unused-parameter
+endif
 
 
 src_ui_gui_psppire_LDFLAGS = \
@@ -431,7 +436,10 @@ src_ui_gui_libpsppire_glade_la_SOURCES = \
 src_ui_gui_libpsppire_glade_la_LIBADD = \
        src/ui/gui/psppire-marshal.lo
 
-src_ui_gui_libpsppire_glade_la_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS)
+src_ui_gui_libpsppire_glade_la_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) $(AM_CFLAGS)
+if cc_is_gcc
+src_ui_gui_libpsppire_glade_la_CFLAGS += -Wno-unused-parameter
+endif
 src_ui_gui_libpsppire_glade_la_LDFLAGS = -release $(VERSION)
 
 EXTRA_DIST += src/ui/gui/psppire.xml src/ui/gui/glade-wrapper.in