summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-06-11 16:50:00 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-06-11 16:50:00 +0000
commitc0a31f2656d1746bce1cc242b6f65c1191a1f529 (patch)
tree770e1151e6292cfb19e3d7ed636f1451229ef83c
parent2e59d67d7aeb5df801899ead4f9e6e386722cacc (diff)
Added the following compiler flags:
* -Wunused-but-set-parameter * -Wignored-qualifiers
-rwxr-xr-xconfigure70
-rw-r--r--configure.ac2
2 files changed, 72 insertions, 0 deletions
diff --git a/configure b/configure
index ec92566..82eec3b 100755
--- a/configure
+++ b/configure
@@ -11858,6 +11858,41 @@ else
:
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused-but-set-parameter" >&5
+$as_echo_n "checking whether C compiler accepts -Wunused-but-set-parameter... " >&6; }
+if ${ax_cv_check_cflags___Wunused_but_set_parameter+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$CFLAGS
+ CFLAGS="$CFLAGS -Wunused-but-set-parameter"
+ 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___Wunused_but_set_parameter=yes
+else
+ ax_cv_check_cflags___Wunused_but_set_parameter=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___Wunused_but_set_parameter" >&5
+$as_echo "$ax_cv_check_cflags___Wunused_but_set_parameter" >&6; }
+if test x"$ax_cv_check_cflags___Wunused_but_set_parameter" = xyes; then :
+ DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wunused-but-set-parameter"
+else
+ :
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Waddress" >&5
$as_echo_n "checking whether C compiler accepts -Waddress... " >&6; }
if ${ax_cv_check_cflags___Waddress+:} false; then :
@@ -12068,6 +12103,41 @@ else
:
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wignored-qualifiers" >&5
+$as_echo_n "checking whether C compiler accepts -Wignored-qualifiers... " >&6; }
+if ${ax_cv_check_cflags___Wignored_qualifiers+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$CFLAGS
+ CFLAGS="$CFLAGS -Wignored-qualifiers"
+ 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___Wignored_qualifiers=yes
+else
+ ax_cv_check_cflags___Wignored_qualifiers=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___Wignored_qualifiers" >&5
+$as_echo "$ax_cv_check_cflags___Wignored_qualifiers" >&6; }
+if test x"$ax_cv_check_cflags___Wignored_qualifiers" = xyes; then :
+ DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wignored-qualifiers"
+else
+ :
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing -Wstrict-aliasing" >&5
$as_echo_n "checking whether C compiler accepts -fstrict-aliasing -Wstrict-aliasing... " >&6; }
if ${ax_cv_check_cflags___fstrict_aliasing__Wstrict_aliasing+:} false; then :
diff --git a/configure.ac b/configure.ac
index fbd88c4..58bae04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,12 +64,14 @@ AC_SUBST(DEFAULT_LDFLAGS)
### Additional flags (if supported)
AX_CHECK_COMPILE_FLAG([-Wparentheses], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wparentheses"])
AX_CHECK_COMPILE_FLAG([-Winit-self], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Winit-self"])
+AX_CHECK_COMPILE_FLAG([-Wunused-but-set-parameter], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wunused-but-set-parameter"])
AX_CHECK_COMPILE_FLAG([-Waddress], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Waddress"])
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([-Wmissing-parameter-type], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wmissing-parameter-type"])
AX_CHECK_COMPILE_FLAG([-Wold-style-definition], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wold-style-definition"])
+AX_CHECK_COMPILE_FLAG([-Wignored-qualifiers], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -Wignored-qualifiers"])
AX_CHECK_COMPILE_FLAG([-fstrict-aliasing -Wstrict-aliasing], [DEFAULT_CFLAGS="$DEFAULT_CFLAGS -fstrict-aliasing -Wstrict-aliasing"])
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"])