mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-12-05 21:27:13 -06:00
explicit void params declarations, add warnings to keep it correct
thx http://nickdesaulniers.github.io/blog/2019/05/12/f-vs-f-void-in-c-vs-c-plus-plus/
This commit is contained in:
17
configure.ac
17
configure.ac
@@ -233,6 +233,23 @@ then
|
||||
)
|
||||
fi
|
||||
|
||||
CFLAGS="$cstd -Wmissing-prototypes -Werror"
|
||||
AC_MSG_CHECKING([whether CC supports -Wmissing-prototypes])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
[AC_MSG_RESULT([yes])]
|
||||
[cstd="$cstd -Wmissing-prototypes"],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
# XXX AC_LANG_PROGRAM produces unsuitable prototype so this check must be last one
|
||||
CFLAGS="$cstd -Wstrict-prototypes -Werror"
|
||||
AC_MSG_CHECKING([whether CC supports -Wstrict-prototypes])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])],
|
||||
[AC_MSG_RESULT([yes])]
|
||||
[cstd="$cstd -Wstrict-prototypes"],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
CFLAGS="$oldcflags"
|
||||
|
||||
AC_ARG_ENABLE([binfilterlen],
|
||||
|
||||
Reference in New Issue
Block a user