autoconf: Added the -Wunused-but-set-variable to the default compile to help avoid commiting more unused variable but set value. Please report if you do have problem with it.
This commit is contained in:
parent
e13821c243
commit
f952719e89
11
configure.in
11
configure.in
|
@ -583,6 +583,17 @@ if test x"$ac_cv_gcc_declaration_after_statement" = xyes; then
|
||||||
fi
|
fi
|
||||||
CFLAGS="$saved_CFLAGS"
|
CFLAGS="$saved_CFLAGS"
|
||||||
|
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
AC_CACHE_CHECK([whether compiler supports -Wunused-but-set-variable], [ac_cv_gcc_unused_but_set_variable], [
|
||||||
|
CFLAGS="$CFLAGS -Wunused-but-set-variable"
|
||||||
|
AC_TRY_COMPILE([],[return 0;],[ac_cv_gcc_unused_but_set_variable=yes],[ac_cv_gcc_unused_but_set_variable=no])
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($ac_cv_gcc_unused_but_set_variable)
|
||||||
|
if test x"$ac_cv_gcc_unused_but_set_variable" = xyes; then
|
||||||
|
APR_ADDTO(SWITCH_ANSI_CFLAGS, -Wunused-but-set-variable)
|
||||||
|
fi
|
||||||
|
CFLAGS="$saved_CFLAGS"
|
||||||
|
|
||||||
AC_C_BIGENDIAN(AC_DEFINE([SWITCH_BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([SWITCH_BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
|
AC_C_BIGENDIAN(AC_DEFINE([SWITCH_BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([SWITCH_BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
|
||||||
|
|
||||||
# Checks for integer size
|
# Checks for integer size
|
||||||
|
|
Loading…
Reference in New Issue