[nginx] Configure: revised GCC version processing.

Sergey Kandaurov pluknet at nginx.com
Tue Jun 7 09:36:57 UTC 2016


details:   http://hg.nginx.org/nginx/rev/ade7d0335d77
branches:  
changeset: 6583:ade7d0335d77
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Tue Jun 07 12:15:56 2016 +0300
description:
Configure: revised GCC version processing.

Now GCC 6 and onwards will use -Wno-unused-parameter.

diffstat:

 auto/cc/gcc |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (31 lines):

diff -r 0626855014d6 -r ade7d0335d77 auto/cc/gcc
--- a/auto/cc/gcc	Tue Jun 07 12:26:34 2016 +0300
+++ b/auto/cc/gcc	Tue Jun 07 12:15:56 2016 +0300
@@ -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
 
 



More information about the nginx-devel mailing list