Fix a comment to reflect reality - -Wcast-qual is added only with

--with-extra-gcc-checks.

Unconditionally add -Wpointer-arith to GCC flags, and, if
--with-extra-gcc-checks is specified, add -Wstrict-prototypes.

svn path=/trunk/; revision=21491
This commit is contained in:
Guy Harris 2007-04-21 23:04:36 +00:00
parent 3b120c2491
commit 464e5030ca
1 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ AC_PATH_PROG(LEX, flex)
AC_SUBST(FLEX_PATH)
#
# If we're running gcc, add '-Wall -W -Wcast-qual' to CFLAGS, and add
# If we're running gcc, add '-Wall -Wpointer-arith -W' 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.
# If "--with-extra-gcc-checks" was specified, add some additional
@ -37,12 +37,12 @@ AC_ARG_WITH(extra-gcc-checks,
[
if test $withval != no
then
wireshark_extra_gcc_flags=" -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -Wmissing-declarations -Wwrite-strings"
wireshark_extra_gcc_flags=" -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings"
fi
],)
AC_MSG_CHECKING(to see if we can add '-Wall -W$wireshark_extra_gcc_flags' to CFLAGS)
AC_MSG_CHECKING(to see if we can add '-Wall -Wpointer-arith -W$wireshark_extra_gcc_flags' to CFLAGS)
if test x$GCC != x ; then
CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W $wireshark_extra_gcc_flags $CFLAGS"
CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -Wpointer-arith -W$wireshark_extra_gcc_flags $CFLAGS"
AC_MSG_RESULT(yes)
else
CFLAGS="-D_U_=\"\" $CFLAGS"