1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-04 05:43:13 +02:00

-Wno-unused-but-set-parameter

[skip ci]
This commit is contained in:
Bram Matthys
2019-07-07 18:11:54 +02:00
parent 79bd78c0f3
commit efe73de70d
2 changed files with 48 additions and 0 deletions
Vendored
+47
View File
@@ -4954,6 +4954,53 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused-parameter" >&5
$as_echo_n "checking whether C compiler accepts -Wunused-parameter... " >&6; }
if ${ax_cv_check_cflags__Werror___Wunused_parameter+:} false; then :
$as_echo_n "(cached) " >&6
else
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -Wunused-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__Werror___Wunused_parameter=yes
else
ax_cv_check_cflags__Werror___Wunused_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__Werror___Wunused_parameter" >&5
$as_echo "$ax_cv_check_cflags__Werror___Wunused_parameter" >&6; }
if test x"$ax_cv_check_cflags__Werror___Wunused_parameter" = xyes; then :
CFLAGS="$CFLAGS -Wno-unused-but-set-parameter"
else
:
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
+1
View File
@@ -212,6 +212,7 @@ dnl don't always care about a variable that may still be present in a build
dnl without DEBUGMODE. Unused variables are optimized out anyway.
check_cc_flag([-Wunused], [CFLAGS="$CFLAGS -Wno-unused"])
check_cc_flag([-Wunused-parameter], [CFLAGS="$CFLAGS -Wno-unused-parameter"])
check_cc_flag([-Wunused-parameter], [CFLAGS="$CFLAGS -Wno-unused-but-set-parameter"])
dnl We use this and this warning is meaningless since 'char' is always unsigned
dnl in UnrealIRCd compiles (-funsigned-char).