[Gnucash-changes] Reenable -Werror everywhere except in lib/goffice.

David Hampton hampton at cvs.gnucash.org
Sat Apr 30 12:40:31 EDT 2005


Log Message:
-----------
Reenable -Werror everywhere except in lib/goffice.  This will cause
automake complaints, but they're worth it.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        configure.in
    gnucash/lib/goffice:
        goffice-plugins.mk
        goffice.mk
    gnucash/macros:
        autogen.sh

Revision Data
-------------
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.359.2.48
retrieving revision 1.359.2.49
diff -Lconfigure.in -Lconfigure.in -u -r1.359.2.48 -r1.359.2.49
--- configure.in
+++ configure.in
@@ -1093,16 +1093,14 @@
 
   # Enable error-on-warning by default -- I'm tired of fixing other
   # people's missing #includes, etc.
-# Re-disabled for the moment since goffice/graph has a lot of specific/manual #warnings-as-TODOs.
-# 2004.12.30 -- jsled
-#   AC_ARG_ENABLE(error-on-warning,
-#     [  --disable-error-on-warning    disable treating compile warnings as errors],
-#     [case "${enableval}" in
-#        yes) warnFLAGS="${warnFLAGS} -Werror" ;;
-#        no)  ;;
-#        *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
-#      esac],
-#        [  warnFLAGS="${warnFLAGS} -Werror" ])
+  AC_ARG_ENABLE(error-on-warning,
+    [  --disable-error-on-warning    disable treating compile warnings as errors],
+    [case "${enableval}" in
+       yes) warnFLAGS="${warnFLAGS} -Werror" ;;
+       no)  ;;
+       *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
+     esac],
+       [  warnFLAGS="${warnFLAGS} -Werror" ])
 
   # For gcc >= 3.4.x, specifically enable the new warning switch
   # -Wdeclaration-after-statement in order to preserve source code
Index: goffice-plugins.mk
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/Attic/goffice-plugins.mk,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Llib/goffice/goffice-plugins.mk -Llib/goffice/goffice-plugins.mk -u -r1.1.4.1 -r1.1.4.2
--- lib/goffice/goffice-plugins.mk
+++ lib/goffice/goffice-plugins.mk
@@ -8,3 +8,8 @@
 GOFFICE_PLUGIN_FLAGS = $(GNUCASH_PLUGIN_LDFLAGS)
 
 AM_CFLAGS = ${GLIB_CFLAGS} ${XML_CFLAGS} ${GSF_CFLAGS} ${ART_CFLAGS} ${GNOME_CFLAGS} ${GDK_PIXBUF_CLFAGS} ${GLADE_CFLAGS}
+
+# This will produce automake complaints, but it allows everything
+# outside of goffice to be copiled with -Werror.  Its worth the one
+# complaint.
+CFLAGS += -Wno-error
Index: goffice.mk
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/Attic/goffice.mk,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Llib/goffice/goffice.mk -Llib/goffice/goffice.mk -u -r1.1.4.1 -r1.1.4.2
--- lib/goffice/goffice.mk
+++ lib/goffice/goffice.mk
@@ -6,3 +6,8 @@
 
 GOFFICE_PLUGIN_FLAGS = 
 # GOFFICE_PLUGIN_FLAGS = $(GNUCASH_PLUGIN_LDFLAGS)
+
+# This will produce automake complaints, but it allows everything
+# outside of goffice to be copiled with -Werror.  Its worth the one
+# complaint.
+CFLAGS += -Wno-error
Index: autogen.sh
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/macros/autogen.sh,v
retrieving revision 1.15.4.8
retrieving revision 1.15.4.9
diff -Lmacros/autogen.sh -Lmacros/autogen.sh -u -r1.15.4.8 -r1.15.4.9
--- macros/autogen.sh
+++ macros/autogen.sh
@@ -281,6 +281,8 @@
 	${AUTOHEADER} || { echo "**Error**: autoheader failed."; exit 1; }
       fi
       echo "Running $AUTOMAKE --gnu $am_opt ..."
+      echo "*** You should ignore any complaints about files in lib/goffice"
+      echo "    overriding the CFLAGS variable."
       $AUTOMAKE --add-missing --gnu $am_opt
       echo "Running autoconf ..."
       autoconf


More information about the gnucash-changes mailing list