[folks] Re-brand ERROR_CFLAGS to C_ERROR_CFLAGS
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Re-brand ERROR_CFLAGS to C_ERROR_CFLAGS
- Date: Fri, 12 Apr 2013 11:33:03 +0000 (UTC)
commit f5271892dac5137a824781f75ea03ee8a8df53dc
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Mon Apr 8 11:43:25 2013 +0100
Re-brand ERROR_CFLAGS to C_ERROR_CFLAGS
These are flags that we only use when compiling hand-written C code,
mostly originating from telepathy-glib. We can't be that strict with
the C code generated by Vala, because it's full of questionable things
(which the Vala compiler verifies are OK, but the C compiler still warns
about).
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697354
Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
Reviewed-by: Philip Withnall <philip tecnocode co uk>
backends/telepathy/lib/Makefile.am | 2 +-
configure.ac | 22 ++++++++++++++--------
tests/lib/telepathy/contactlist/Makefile.am | 2 +-
3 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/backends/telepathy/lib/Makefile.am b/backends/telepathy/lib/Makefile.am
index 094916b..535d501 100644
--- a/backends/telepathy/lib/Makefile.am
+++ b/backends/telepathy/lib/Makefile.am
@@ -33,7 +33,7 @@ tp_lowlevel_headers = tp-lowlevel.h
libtp_lowlevel_la_CFLAGS = \
$(AM_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
- $(ERROR_CFLAGS) \
+ $(C_ERROR_CFLAGS) \
$(GIO_CFLAGS) \
$(GLIB_CFLAGS) \
$(GEE_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index a7c4da0..b383c78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -436,7 +436,12 @@ IT_PROG_INTLTOOL([0.50.0])
# but we need it for dbus-glib. Porting to GDBus will solve this (#653198)
AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
-AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
+# C_ERROR_CFLAGS are only used for C code from telepathy-glib for now,
+# while ERROR_CFLAGS are used for everything.
+
+ERROR_CFLAGS=
+
+AS_COMPILER_FLAG([-Wall], [C_ERROR_CFLAGS="-Wall"], [C_ERROR_CFLAGS=""])
AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
AC_ARG_ENABLE([debug],
@@ -484,7 +489,7 @@ m4_if(folks_released, [1], [],
-a x$winit_self = xyes -a x$wformat = xyes -a \
x$wmissing_include_dirs = xyes -a x$waggregate_return = xyes -a \
x$wdeclaration_after_statement = xyes; then
- ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
+ C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wextra \
-Wno-missing-field-initializers \
-Wno-unused-parameter ${flag}strict-prototypes \
${flag}missing-prototypes ${flag}implicit-function-declaration \
@@ -494,17 +499,18 @@ m4_if(folks_released, [1], [],
fi
])
-AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
-AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
-AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
-AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
+AS_COMPILER_FLAG([-D_POSIX_SOURCE], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -D_POSIX_SOURCE"])
+AS_COMPILER_FLAG([-std=c99], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -std=c99"])
+AS_COMPILER_FLAG([-Wshadow], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wshadow"])
+AS_COMPILER_FLAG([-Wmissing-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
-Wmissing-prototypes"])
-AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
+AS_COMPILER_FLAG([-Wmissing-declarations], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
-Wmissing-declarations"])
-AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
+AS_COMPILER_FLAG([-Wstrict-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
-Wstrict-prototypes"])
AC_SUBST([ERROR_CFLAGS])
+AC_SUBST([C_ERROR_CFLAGS])
# -----------------------------------------------------------
# Code coverage flags
diff --git a/tests/lib/telepathy/contactlist/Makefile.am b/tests/lib/telepathy/contactlist/Makefile.am
index 1ddd7a3..7cb0cb6 100644
--- a/tests/lib/telepathy/contactlist/Makefile.am
+++ b/tests/lib/telepathy/contactlist/Makefile.am
@@ -40,7 +40,7 @@ libtp_test_contactlist_la_SOURCES = \
$(NULL)
libtp_test_contactlist_la_CFLAGS = \
- $(ERROR_CFLAGS) \
+ $(C_ERROR_CFLAGS) \
$(TP_GLIB_CFLAGS) \
$(DBUS_GLIB_CFLAGS) \
$(NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]