[evolution] Bug 653157 - Enable extra compiler warnings in maintainer mode only
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 653157 - Enable extra compiler warnings in maintainer mode only
- Date: Mon, 29 Sep 2014 11:23:57 +0000 (UTC)
commit ea39e76e6fc424d8fa9384a633c187a86fe9f898
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 29 13:22:53 2014 +0200
Bug 653157 - Enable extra compiler warnings in maintainer mode only
The 'extra' means also deprecated warnings. Those are not interesting
for non-developers.
configure.ac | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ea557c9..25017b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,17 +68,29 @@ m4_define([libcanberra_gtk_minimum_version], [0.25])
m4_define([libnotify_minimum_version], [0.7])
dnl ******************************
+dnl Initialize maintainer mode
+dnl ******************************
+AM_MAINTAINER_MODE([enable])
+
+dnl ******************************
dnl Compiler Warning Flags
dnl ******************************
+proposed_warning_flags=
+
+if test "x$enable_maintainer_mode" = "xyes" ; then
+ proposed_warning_flags="-Wall -Wextra -Wdeprecated-declarations"
+else
+ proposed_warning_flags="-Wno-deprecated-declarations"
+fi
+
AS_COMPILER_FLAGS(WARNING_FLAGS,
- "-Wall -Wextra
- -Wdeprecated-declarations
+ "$proposed_warning_flags
-Wno-missing-field-initializers
-Wno-sign-compare
-Wno-unused-parameter
-Wdeclaration-after-statement
-Werror-implicit-function-declaration
- -Wformat-security -Winit-self
+ -Wformat -Wformat-security -Winit-self
-Wmissing-declarations -Wmissing-include-dirs
-Wmissing-noreturn -Wnested-externs -Wpointer-arith
-Wredundant-decls -Wundef -Wwrite-strings")
@@ -132,11 +144,6 @@ dnl Put the ACLOCAL flags in the Makefile
dnl *************************************
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-dnl ******************************
-dnl Initialize maintainer mode
-dnl ******************************
-AM_MAINTAINER_MODE([enable])
-
if test "$evo_version" != "$evo_stable_version"; then
AC_DEFINE(STABLE_VERSION, ["evo_stable_version"],
[Define to the latest stable version if this version is unstable])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]