configure: enable additional code cleanliness warnings
We are supposed to handle compiling on a "C90 plus long long"
compiler, so make gcc (our most common development platform compiler)
complain when we don't.
However, suppress the complaints about the Microsoft definitions of
the <inttypes.h> strings.
From master branch checkin 25da6eaf43
,
except that -Wwrite-strings is omitted; making the code base
-Wwrite-strings clean is going to take additional work.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
409e2df1f2
commit
52e8646d17
2 changed files with 6 additions and 1 deletions
3
aclocal.m4
vendored
3
aclocal.m4
vendored
|
@ -9,7 +9,8 @@ AC_DEFUN(PA_ADD_CFLAGS,
|
|||
CFLAGS="$CFLAGS $1"
|
||||
AC_TRY_LINK([#include <stdio.h>],
|
||||
[printf("Hello, World!\n");],
|
||||
AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$pa_add_cflags__old_cflags ifelse([$2],[],[$1],[$2])",
|
||||
AC_MSG_RESULT([no])
|
||||
CFLAGS="$pa_add_cflags__old_cflags")])
|
||||
|
||||
|
|
|
@ -183,6 +183,10 @@ AC_ARG_ENABLE([ccache],
|
|||
[])
|
||||
|
||||
PA_ADD_CFLAGS([-pedantic])
|
||||
dnl Suppress format warning on Windows targets due to their <inttypes.h>
|
||||
PA_ADD_CFLAGS([-Wpedantic-ms-format],[-Wno-pedantic-ms-format])
|
||||
PA_ADD_CFLAGS([-Wc90-c99-compat])
|
||||
PA_ADD_CFLAGS([-Wlong-long],[-Wno-long-long])
|
||||
AC_ARG_ENABLE([werror],
|
||||
[AC_HELP_STRING([--enable-werror],
|
||||
[compile with -Werror to error out on any warning])],
|
||||
|
|
Loading…
Reference in a new issue