Add "-Wcast-qual" to the list of "-W" flags, so we catch code that could

attempt to store through a const pointer.

svn path=/trunk/; revision=6680
This commit is contained in:
Guy Harris 2002-11-27 22:24:27 +00:00
parent a40e352b26
commit 08044b0409
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $Id: configure.in,v 1.42 2002/10/09 22:58:53 jmayer Exp $
# $Id: configure.in,v 1.43 2002/11/27 22:24:27 guy Exp $
dnl
dnl Process this file with autoconf 2.13 or later to produce a
dnl configure script; 2.12 doesn't generate a "configure" script that
@ -30,7 +30,7 @@ AC_PATH_PROG(LEX, flex)
AC_SUBST(FLEX_PATH)
#
# If we're running gcc, add '-Wall -W' to CFLAGS, and add
# If we're running gcc, add '-Wall -W -Wcast-qual' to CFLAGS, and add
# '-D_U_="__attribute__((unused))"' as well, so we can use _U_ to
# flag unused function arguments and not get warnings about them.
#
@ -39,7 +39,7 @@ AC_SUBST(FLEX_PATH)
#
AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS)
if test x$GCC != x ; then
CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W $CFLAGS"
CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wcast-qual $CFLAGS"
AC_MSG_RESULT(yes)
else
CFLAGS="-D_U_=\"\" $CFLAGS"