Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#3026)
Home

[Freeciv-Dev] Re: (PR#3026)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3026)
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 10 Feb 2003 13:24:34 -0800
Reply-to: rt.freeciv.org@xxxxxxxxxxxxxx

On Sat, Feb 08, 2003 at 09:28:40PM -0800, Vasco Alexandre Da Silva Costa via RT 
wrote:
> 
> 
> On Sat, 8 Feb 2003, Jason Short via RT wrote:
> 
> >
> > The attached patch fixes a compiler warning in gui-gtk-2.0.
> >
>   (... a patch which makes some function static...)
> 
> 
> Could someone please add an option to autoconf so we can all use the same
> warning flags? I do not like modifying shell variables much.

Patch attached. Some extra flags for all cases under gcc. -Werror if
enable-debug=yes.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  (On the statement print "42 monkeys"+"1 snake"): BTW, both perl and Python
  get this wrong. Perl gives 43 and Python gives "42 monkeys1 snake", when 
  the answer is clearly "41 monkeys and 1 fat snake".  
    -- Jim Fulton, 10 Aug 1999

Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.35
diff -u -u -r1.35 configure.ac
--- configure.ac        2003/01/16 22:14:13     1.35
+++ configure.ac        2003/02/10 21:19:01
@@ -255,7 +255,7 @@
 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", [Locale directory])
 
 if test -n "$GCC"; then
-   CFLAGS="$CFLAGS -Wall"
+   CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations"
 fi
 
 if test "$CVS_DEPS" = "maybe"; then
@@ -669,6 +669,9 @@
      fi
    fi]],[[]])
 
+if test -n "$GCC"; then
+  CFLAGS="$CFLAGS $EXTRA_GCC_DEBUG_CFLAGS"
+fi
 
 AC_CONFIG_FILES([Makefile
           data/Makefile 
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.213
diff -u -u -r1.213 configure.in
--- configure.in        2003/01/16 22:14:13     1.213
+++ configure.in        2003/02/10 21:19:02
@@ -254,7 +254,7 @@
 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
 
 if test -n "$GCC"; then
-   CFLAGS="$CFLAGS -Wall"
+   CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations"
 fi
 
 if test "$CVS_DEPS" = "maybe"; then
@@ -665,6 +665,9 @@
      fi
    fi])
 
+if test -n "$GCC"; then
+  CFLAGS="$CFLAGS $EXTRA_GCC_DEBUG_CFLAGS"
+fi
 
 AC_OUTPUT(Makefile
           data/Makefile 
Index: m4/debug.m4
===================================================================
RCS file: /home/freeciv/CVS/freeciv/m4/debug.m4,v
retrieving revision 1.4
diff -u -u -r1.4 debug.m4
--- m4/debug.m4 2003/01/13 21:24:05     1.4
+++ m4/debug.m4 2003/02/10 21:19:10
@@ -8,9 +8,12 @@
   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
 esac], [enable_debug=some])
 
+EXTRA_GCC_DEBUG_CFLAGS=""
+
 dnl -g is added by AC_PROG_CC if the compiler understands it
 if test "x$enable_debug" = "xyes"; then
   AC_DEFINE(DEBUG, 1, [Define if you want extra debugging.])
+  EXTRA_GCC_DEBUG_CFLAGS="-Werror"
 else
   if test "x$enable_debug" = "xno"; then
     AC_DEFINE(NDEBUG, 1, [Define if you want no debug support.])

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#3026), Vasco Alexandre Da Silva Costa via RT, 2003/02/08
    • Message not available
      • [Freeciv-Dev] Re: (PR#3026), Raimar Falke via RT <=