[gjs/wip/ptomato/autotools] WIP - use default compiler warning flags



commit a5842427c57658738bdad76e8690d378457ce866
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Sep 28 23:33:40 2016 -0700

    WIP - use default compiler warning flags

 Makefile-insttest.am |   18 +++++++++++++++---
 Makefile.am          |    9 +++++++--
 configure.ac         |    2 +-
 gjs/compat.h         |    2 ++
 4 files changed, 25 insertions(+), 6 deletions(-)
---
diff --git a/Makefile-insttest.am b/Makefile-insttest.am
index 1003b0c..59991f9 100644
--- a/Makefile-insttest.am
+++ b/Makefile-insttest.am
@@ -95,7 +95,11 @@ libgimarshallingtests_la_LIBADD = $(common_test_libadd)
 Regress-1.0.gir: libregress.la
 Regress_1_0_gir_LIBS = libregress.la
 Regress_1_0_gir_FILES = $(nodist_libregress_la_SOURCES)
-Regress_1_0_gir_SCANNERFLAGS = --warn-all --warn-error $(libregress_scannerflags_includes)
+Regress_1_0_gir_SCANNERFLAGS =                 \
+       --warn-all --warn-error                 \
+       $(libregress_scannerflags_includes)     \
+       $(WARN_SCANNERFLAGS)                    \
+       $(NULL)
 if !ENABLE_CAIRO
 Regress_1_0_gir_CFLAGS = -D_GI_DISABLE_CAIRO
 endif
@@ -105,14 +109,22 @@ WarnLib-1.0.gir: libwarnlib.la
 WarnLib_1_0_gir_LIBS = libwarnlib.la
 WarnLib_1_0_gir_INCLUDES = Gio-2.0
 WarnLib_1_0_gir_FILES = $(nodist_libwarnlib_la_SOURCES)
-WarnLib_1_0_gir_SCANNERFLAGS = --c-include="warnlib.h" --symbol-prefix=warnlib_
+WarnLib_1_0_gir_SCANNERFLAGS =         \
+       --c-include="warnlib.h"         \
+       --symbol-prefix=warnlib_        \
+       $(WARN_SCANNERFLAGS)            \
+       $(NULL)
 TEST_INTROSPECTION_GIRS += WarnLib-1.0.gir
 
 GIMarshallingTests-1.0.gir: libgimarshallingtests.la
 GIMarshallingTests_1_0_gir_LIBS = libgimarshallingtests.la
 GIMarshallingTests_1_0_gir_INCLUDES = Gio-2.0
 GIMarshallingTests_1_0_gir_FILES = $(nodist_libgimarshallingtests_la_SOURCES)
-GIMarshallingTests_1_0_gir_SCANNERFLAGS = --symbol-prefix=gi_marshalling_tests --warn-all --warn-error
+GIMarshallingTests_1_0_gir_SCANNERFLAGS =      \
+       --symbol-prefix=gi_marshalling_tests    \
+       --warn-all --warn-error                 \
+       $(WARN_SCANNERFLAGS)                    \
+       $(NULL)
 TEST_INTROSPECTION_GIRS += GIMarshallingTests-1.0.gir
 
 $(foreach gir,$(TEST_INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
diff --git a/Makefile.am b/Makefile.am
index d4d8f5c..7270b97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@ INTROSPECTION_GIRS =
 ACLOCAL_AMFLAGS = -I m4
 AM_CXXFLAGS = $(WARN_CXXFLAGS) $(CODE_COVERAGE_CFLAGS)
 AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gjs\" $(CODE_COVERAGE_CPPFLAGS)
-AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS) $(CODE_COVERAGE_LDFLAGS)
 
 gjsjsdir = @gjsjsdir@
 gjsoverridedir = $(gjsjsdir)/overrides
@@ -176,7 +176,12 @@ GjsPrivate-1.0.gir: libgjs.la
 GjsPrivate_1_0_gir_LIBS = libgjs.la
 GjsPrivate_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
 GjsPrivate_1_0_gir_FILES = $(libgjs_private_source_files)
-GjsPrivate_1_0_gir_SCANNERFLAGS = --identifier-prefix=Gjs --symbol-prefix=gjs_ --warn-all
+GjsPrivate_1_0_gir_SCANNERFLAGS =      \
+       --identifier-prefix=Gjs         \
+       --symbol-prefix=gjs_            \
+       --warn-all                      \
+       $(WARN_SCANNERFLAGS)            \
+       $(NULL)
 
 if ENABLE_GTK
 GjsPrivate_1_0_gir_INCLUDES += Gtk-3.0
diff --git a/configure.ac b/configure.ac
index 89548cf..240784a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ LT_PREREQ([2.2.0])
 # no stupid static libraries
 LT_INIT([disable-static])
 
-GNOME_CXX_WARNINGS([maximum])
+AX_COMPILER_FLAGS
 
 AX_CODE_COVERAGE
 dnl Clang does not need to link with -lgcov
diff --git a/gjs/compat.h b/gjs/compat.h
index 89c2415..a99e04f 100644
--- a/gjs/compat.h
+++ b/gjs/compat.h
@@ -33,6 +33,8 @@
 _Pragma("clang diagnostic push")
 _Pragma("clang diagnostic ignored \"-Wuninitialized\"")
 _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"")
+_Pragma("clang diagnostic ignored \"-Wunused-variable\"")
+_Pragma("clang diagnostic ignored \"-Wignored-qualifiers\"")
 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
 _Pragma("GCC diagnostic push")
 _Pragma("GCC diagnostic ignored \"-Wstrict-prototypes\"")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]