]> git.kaiwu.me - nginx.git/commitdiff
Configure: revised GCC version processing.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 7 Jun 2016 09:15:56 +0000 (12:15 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 7 Jun 2016 09:15:56 +0000 (12:15 +0300)
Now GCC 6 and onwards will use -Wno-unused-parameter.

auto/cc/gcc

index c9101fea15bd8a3a43eb26afa4502d24a218b0bd..5f93ca392aaebde371701144a7c05905b4dea622 100644 (file)
@@ -151,9 +151,13 @@ CFLAGS="$CFLAGS -Wall -Wpointer-arith"
 #CFLAGS="$CFLAGS -Winline"
 #CFLAGS="$CFLAGS -Wmissing-prototypes"
 
-
 case "$NGX_GCC_VER" in
-    [3-5].*)
+    2.*)
+        # we have a lot of the unused function arguments
+        CFLAGS="$CFLAGS -Wno-unused"
+    ;;
+
+    *)
         # 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