changeset 6583:ade7d0335d77

Configure: revised GCC version processing. Now GCC 6 and onwards will use -Wno-unused-parameter.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 07 Jun 2016 12:15:56 +0300
parents 0626855014d6
children 690b15cc8915
files auto/cc/gcc
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/auto/cc/gcc
+++ b/auto/cc/gcc
@@ -151,9 +151,13 @@ CFLAGS="$CFLAGS -Wall -Wpointer-arith"
 #CFLAGS="$CFLAGS -Winline"
 #CFLAGS="$CFLAGS -Wmissing-prototypes"
 
+case "$NGX_GCC_VER" in
+    2.*)
+        # we have a lot of the unused function arguments
+        CFLAGS="$CFLAGS -Wno-unused"
+    ;;
 
-case "$NGX_GCC_VER" in
-    [3-5].*)
+    *)
         # we have a lot of the unused function arguments
         CFLAGS="$CFLAGS -Wno-unused-parameter"
         # 4.2.1 shows the warning in wrong places
@@ -164,11 +168,6 @@ case "$NGX_GCC_VER" in
             CFLAGS="$CFLAGS -Wno-deprecated-declarations"
         fi
     ;;
-
-    *)
-        # we have a lot of the unused function arguments
-        CFLAGS="$CFLAGS -Wno-unused"
-    ;;
 esac