diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2016-06-07 12:15:56 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2016-06-07 12:15:56 +0300 |
commit | 5d9419704ff4aa30d38f1570c0adfcf0ebe9cc2b (patch) | |
tree | 955c7962e3a859982e652c9f7899632a961179b3 | |
parent | ba212375a78521347f5fead2bf991738fed163f0 (diff) | |
download | nginx-5d9419704ff4aa30d38f1570c0adfcf0ebe9cc2b.tar.gz nginx-5d9419704ff4aa30d38f1570c0adfcf0ebe9cc2b.zip |
Configure: revised GCC version processing.
Now GCC 6 and onwards will use -Wno-unused-parameter.
-rw-r--r-- | auto/cc/gcc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/auto/cc/gcc b/auto/cc/gcc index c9101fea1..5f93ca392 100644 --- 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 - [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 |