summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2013-10-25 11:50:31 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2013-10-25 18:00:07 +0100
commitec466f400d79e58ac655919bf7c3047909c4aecd (patch)
tree6c88e16e22b4f1ae3b0558cf481dee047f1c167e /tests
parent3da175cc6cd81eeccbef602197d10813dadea0c9 (diff)
build: Disable some GCC warnings for generated C code
The GCC warning spew which results from Vala’s non-perfect generated C code is distracting and can mask genuine warnings from valac or GCC. This patch adds some #pragmas in warnings.h which disable as many of these warnings as possible. Unfortunately some of the warnings are for const qualifier discards and passing parameters of the wrong type, which (as far as I know) can’t be disabled. In any case, this patch eliminates GCC warnings for several C files, which is better than nothing. Note that warnings.h should only be included in build targets which compile only Vala, and don’t compile any non-generated C code. Non-generated C code should always be compiled with all warnings enabled, to catch legitimate errors. See the comment at the top of warnings.h. https://bugzilla.gnome.org/show_bug.cgi?id=710869
Diffstat (limited to 'tests')
-rw-r--r--tests/eds/Makefile.am1
-rw-r--r--tests/folks/Makefile.am1
-rw-r--r--tests/key-file/Makefile.am1
-rw-r--r--tests/lib/eds/Makefile.am5
-rw-r--r--tests/lib/key-file/Makefile.am5
-rw-r--r--tests/lib/libsocialweb/Makefile.am5
-rw-r--r--tests/lib/telepathy/Makefile.am5
-rw-r--r--tests/lib/tracker/Makefile.am5
-rw-r--r--tests/libsocialweb/Makefile.am1
-rw-r--r--tests/telepathy/Makefile.am1
-rw-r--r--tests/tracker/Makefile.am1
11 files changed, 31 insertions, 0 deletions
diff --git a/tests/eds/Makefile.am b/tests/eds/Makefile.am
index 2a367ec9..5f3f590d 100644
--- a/tests/eds/Makefile.am
+++ b/tests/eds/Makefile.am
@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/tests/lib \
-I$(top_srcdir)/tests/lib/eds \
-include $(CONFIG_HEADER) \
+ -include $(top_srcdir)/folks/warnings.h \
$(NULL)
LDADD = \
diff --git a/tests/folks/Makefile.am b/tests/folks/Makefile.am
index 95f04932..0856529e 100644
--- a/tests/folks/Makefile.am
+++ b/tests/folks/Makefile.am
@@ -13,6 +13,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/tests/lib/telepathy \
-I$(top_srcdir)/tests/lib/telepathy/contactlist \
-include $(CONFIG_HEADER) \
+ -include $(top_srcdir)/folks/warnings.h \
$(NULL)
LDADD = \
diff --git a/tests/key-file/Makefile.am b/tests/key-file/Makefile.am
index b10e1c46..32ab4593 100644
--- a/tests/key-file/Makefile.am
+++ b/tests/key-file/Makefile.am
@@ -10,6 +10,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/tests/lib \
-I$(top_srcdir)/tests/lib/key-file \
-include $(CONFIG_HEADER) \
+ -include $(top_srcdir)/folks/warnings.h \
$(NULL)
LDADD = \
diff --git a/tests/lib/eds/Makefile.am b/tests/lib/eds/Makefile.am
index a09beafb..ab426735 100644
--- a/tests/lib/eds/Makefile.am
+++ b/tests/lib/eds/Makefile.am
@@ -29,6 +29,11 @@ libeds_test_la_SOURCES = \
test-case.vala \
$(NULL)
+libeds_test_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -include $(top_srcdir)/folks/warnings.h \
+ $(NULL)
+
libeds_test_la_CFLAGS = \
$(AM_CFLAGS) \
$(ERROR_CFLAGS) \
diff --git a/tests/lib/key-file/Makefile.am b/tests/lib/key-file/Makefile.am
index 6bb4844e..1123eac2 100644
--- a/tests/lib/key-file/Makefile.am
+++ b/tests/lib/key-file/Makefile.am
@@ -21,6 +21,11 @@ libkf_test_la_SOURCES = \
test-case.vala \
$(NULL)
+libkf_test_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -include $(top_srcdir)/folks/warnings.h \
+ $(NULL)
+
libkf_test_la_CFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/tests/lib \
diff --git a/tests/lib/libsocialweb/Makefile.am b/tests/lib/libsocialweb/Makefile.am
index 311c5cc9..d55d4394 100644
--- a/tests/lib/libsocialweb/Makefile.am
+++ b/tests/lib/libsocialweb/Makefile.am
@@ -26,6 +26,11 @@ libsocialweb_test_la_SOURCES = \
test-case.vala \
$(NULL)
+libsocialweb_test_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -include $(top_srcdir)/folks/warnings.h \
+ $(NULL)
+
libsocialweb_test_la_CFLAGS = \
$(AM_CFLAGS) \
$(ERROR_CFLAGS) \
diff --git a/tests/lib/telepathy/Makefile.am b/tests/lib/telepathy/Makefile.am
index 19d72e26..b3c089ca 100644
--- a/tests/lib/telepathy/Makefile.am
+++ b/tests/lib/telepathy/Makefile.am
@@ -30,6 +30,11 @@ libtpf_test_la_SOURCES = \
test-case.vala \
$(NULL)
+libtpf_test_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -include $(top_srcdir)/folks/warnings.h \
+ $(NULL)
+
libtpf_test_la_CFLAGS = \
$(AM_CFLAGS) \
$(ERROR_CFLAGS) \
diff --git a/tests/lib/tracker/Makefile.am b/tests/lib/tracker/Makefile.am
index 7da67014..d09256a5 100644
--- a/tests/lib/tracker/Makefile.am
+++ b/tests/lib/tracker/Makefile.am
@@ -26,6 +26,11 @@ libtracker_test_la_SOURCES = \
test-case.vala \
$(NULL)
+libtracker_test_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -include $(top_srcdir)/folks/warnings.h \
+ $(NULL)
+
libtracker_test_la_CFLAGS = \
$(AM_CFLAGS) \
$(ERROR_CFLAGS) \
diff --git a/tests/libsocialweb/Makefile.am b/tests/libsocialweb/Makefile.am
index c1f2e47e..36958f0a 100644
--- a/tests/libsocialweb/Makefile.am
+++ b/tests/libsocialweb/Makefile.am
@@ -14,6 +14,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/tests/lib \
-I$(top_srcdir)/tests/lib/libsocialweb \
-include $(CONFIG_HEADER) \
+ -include $(top_srcdir)/folks/warnings.h \
$(NULL)
LDADD = \
diff --git a/tests/telepathy/Makefile.am b/tests/telepathy/Makefile.am
index 5eda26d5..88d6992e 100644
--- a/tests/telepathy/Makefile.am
+++ b/tests/telepathy/Makefile.am
@@ -16,6 +16,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/tests/lib/telepathy \
-I$(top_srcdir)/tests/lib/telepathy/contactlist \
-include $(CONFIG_HEADER) \
+ -include $(top_srcdir)/folks/warnings.h \
$(NULL)
LDADD = \
diff --git a/tests/tracker/Makefile.am b/tests/tracker/Makefile.am
index 44db0261..2bfdc9f8 100644
--- a/tests/tracker/Makefile.am
+++ b/tests/tracker/Makefile.am
@@ -19,6 +19,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/tests/lib \
-I$(top_srcdir)/tests/lib/tracker \
-include $(CONFIG_HEADER) \
+ -include $(top_srcdir)/folks/warnings.h \
$(NULL)
LDADD = \