Added -Wformat-nonliteral flag.

This commit is contained in:
Xavier Roche
2014-05-28 19:11:04 +00:00
parent f919aab408
commit 803f7b5a33
2 changed files with 36 additions and 0 deletions

35
configure vendored
View File

@@ -11927,6 +11927,41 @@ else
:
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat-nonliteral" >&5
$as_echo_n "checking whether C compiler accepts -Wformat-nonliteral... " >&6; }
if ${ax_cv_check_cflags___Wformat_nonliteral+:} false; then :
$as_echo_n "(cached) " >&6
else
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Wformat-nonliteral"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ax_cv_check_cflags___Wformat_nonliteral=yes
else
ax_cv_check_cflags___Wformat_nonliteral=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wformat_nonliteral" >&5
$as_echo "$ax_cv_check_cflags___Wformat_nonliteral" >&6; }
if test x"$ax_cv_check_cflags___Wformat_nonliteral" = xyes; then :
DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wformat-nonliteral"
else
:
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing -Wstrict-aliasing=2" >&5
$as_echo_n "checking whether C compiler accepts -fstrict-aliasing -Wstrict-aliasing=2... " >&6; }
if ${ax_cv_check_cflags___fstrict_aliasing__Wstrict_aliasing_2+:} false; then :

View File

@@ -65,6 +65,7 @@ AX_CHECK_COMPILE_FLAG([-Wparentheses], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wparent
AX_CHECK_COMPILE_FLAG([-Winit-self], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Winit-self"])
AX_CHECK_COMPILE_FLAG([-Wuninitialized], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wuninitialized"])
AX_CHECK_COMPILE_FLAG([-Wformat=2], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wformat=2"])
AX_CHECK_COMPILE_FLAG([-Wformat-nonliteral], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wformat-nonliteral"])
AX_CHECK_COMPILE_FLAG([-fstrict-aliasing -Wstrict-aliasing=2], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -fstrict-aliasing -Wstrict-aliasing=2"])
AX_CHECK_LINK_FLAG([-Wl,--discard-all], [DEFAULT_LDLAGS="$DEFAULT_LDLAGS -Wl,--discard-all"])
AX_CHECK_LINK_FLAG([-Wl,--no-undefined], [DEFAULT_LDLAGS="$DEFAULT_LDLAGS -Wl,--no-undefined"])