From: Egbert Eich <e...@suse.com> With '-Wformat-nonliteral' gcc kindly arns us that it cannot check the arguments of a scanf statement as the format string is not literal. Here in this code this is done for a reason though thus we disable the warning for the code in question.
Signed-off-by: Egbert Eich <e...@suse.com> --- src/Makefile.am | 5 +++++ src/common.mk | 4 +++- test/Makefile.am | 14 +++++++++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index b9fecc6..095d7e1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,3 +35,8 @@ AM_CPPFLAGS=-I$(top_srcdir)/include/ AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(UDEV_CFLAGS) @DRIVER_NAME@_drv_la_SOURCES = $(DRIVER_SOURCES) + +@DRIVER_NAME@_drv_la_LIBADD = libtmp.la +noinst_LTLIBRARIES = libtmp.la +libtmp_la_SOURCES = $(OTHER_SOURCES) +libtmp_la_CFLAGS = $(AM_CFLAGS) -Wformat=1 diff --git a/src/common.mk b/src/common.mk index 7f1eadd..42249fe 100644 --- a/src/common.mk +++ b/src/common.mk @@ -5,7 +5,6 @@ DRIVER_SOURCES= \ $(top_srcdir)/src/xf86Wacom.h \ $(top_srcdir)/src/wcmCommon.c \ $(top_srcdir)/src/wcmConfig.c \ - $(top_srcdir)/src/wcmISDV4.c \ $(top_srcdir)/src/wcmFilter.c \ $(top_srcdir)/src/wcmFilter.h \ $(top_srcdir)/src/xf86WacomDefs.h \ @@ -14,3 +13,6 @@ DRIVER_SOURCES= \ $(top_srcdir)/src/wcmValidateDevice.c \ $(top_srcdir)/src/wcmTouchFilter.c \ $(top_srcdir)/src/wcmTouchFilter.h + +OTHER_SOURCES = \ + $(top_srcdir)/src/wcmISDV4.c diff --git a/test/Makefile.am b/test/Makefile.am index d16dca8..143be31 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -2,18 +2,22 @@ if UNITTESTS include ../src/common.mk check_PROGRAMS = wacom-tests -check_LTLIBRARIES = libwacom-test.la -libwacom_test_la_SOURCES =$(DRIVER_SOURCES) -libwacom_test_la_CFLAGS = -DUNIT_TESTS -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default +check_LTLIBRARIES = libwacom-test-1.la libwacom-test-2.la +libwacom_test_1_la_SOURCES =$(DRIVER_SOURCES) +libwacom_test_1_la_CFLAGS = -DUNIT_TESTS -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default + +libwacom_test_2_la_SOURCES =$(OTHER_SOURCES) +libwacom_test_2_la_CFLAGS = -DUNIT_TESTS -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default -Wformat=1 TESTS=$(check_PROGRAMS) AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(UDEV_CFLAGS) -TEST_LDADD= libwacom-test.la +TEST_1_LDADD= libwacom-test-1.la +TEST_2_LDADD= libwacom-test-2.la COMMON_SOURCES=fake-symbols.c fake-symbols.h -wacom_tests_LDADD=$(TEST_LDADD) $(UDEV_LIBS) +wacom_tests_LDADD=$(TEST_1_LDADD) $(TEST_2_LDADD) $(UDEV_LIBS) wacom_tests_CFLAGS= -DUNIT_TESTS $(AM_CFLAGS) wacom_tests_SOURCES=wacom-tests.c $(COMMON_SOURCES) -- 1.8.1.4 ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel