]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't warn about declarations after statements.
authorGuy Harris <[email protected]>
Sat, 15 Sep 2018 20:16:02 +0000 (13:16 -0700)
committerGuy Harris <[email protected]>
Sat, 15 Sep 2018 20:16:02 +0000 (13:16 -0700)
We now allow them, and require a compiler that supports them, so there's
no need to warn about them.

CMakeLists.txt
aclocal.m4
configure

index 9db6094762e6b94a35343694bcfda6300000e4c2..93592c3c9426c091a680049da2d49ee65ffdc11a 100644 (file)
@@ -866,7 +866,6 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.devel)
         check_and_add_compiler_option(-Wall)
         check_and_add_compiler_option(-Wassign-enum)
         check_and_add_compiler_option(-Wcast-qual)
-        check_and_add_compiler_option(-Wdeclaration-after-statement)
         check_and_add_compiler_option(-Wmissing-prototypes)
         check_and_add_compiler_option(-Wold-style-definition)
         check_and_add_compiler_option(-Wpedantic)
index 4d31f29ca987d5fde1bc7f7ab0c26febbce0381c..bb322371b722b519eba31e735df46520755b90cb 100644 (file)
@@ -874,7 +874,6 @@ AC_DEFUN(AC_LBL_DEVEL,
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wall)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wassign-enum)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wcast-qual)
-                   AC_LBL_CHECK_COMPILER_OPT($1, -Wdeclaration-after-statement)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wold-style-definition)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wpedantic)
index 19259b412341ce218c93f2a0047ed462b7c0e1cb..b76db5207c21eb9321f370ff49998bfbef5a4cdc 100755 (executable)
--- a/configure
+++ b/configure
@@ -6920,49 +6920,6 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdeclaration-after-statement option" >&5
-$as_echo_n "checking whether the compiler supports the -Wdeclaration-after-statement option... " >&6; }
-       save_CFLAGS="$CFLAGS"
-       if expr "x-Wdeclaration-after-statement" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdeclaration-after-statement"
-       elif expr "x-Wdeclaration-after-statement" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
-       elif expr "x-Wdeclaration-after-statement" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
-       else
-           CFLAGS="$CFLAGS -Wdeclaration-after-statement"
-       fi
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-               CFLAGS="$save_CFLAGS"
-               V_CCOPT="$V_CCOPT -Wdeclaration-after-statement"
-
-else
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               CFLAGS="$save_CFLAGS"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
 $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
        save_CFLAGS="$CFLAGS"