comparison auto/cc/gcc @ 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 c041f1e0655f
children 9eefb38f0005
comparison
equal deleted inserted replaced
6582:0626855014d6 6583:ade7d0335d77
149 CFLAGS="$CFLAGS -Wall -Wpointer-arith" 149 CFLAGS="$CFLAGS -Wall -Wpointer-arith"
150 #CFLAGS="$CFLAGS -Wconversion" 150 #CFLAGS="$CFLAGS -Wconversion"
151 #CFLAGS="$CFLAGS -Winline" 151 #CFLAGS="$CFLAGS -Winline"
152 #CFLAGS="$CFLAGS -Wmissing-prototypes" 152 #CFLAGS="$CFLAGS -Wmissing-prototypes"
153 153
154 case "$NGX_GCC_VER" in
155 2.*)
156 # we have a lot of the unused function arguments
157 CFLAGS="$CFLAGS -Wno-unused"
158 ;;
154 159
155 case "$NGX_GCC_VER" in 160 *)
156 [3-5].*)
157 # we have a lot of the unused function arguments 161 # we have a lot of the unused function arguments
158 CFLAGS="$CFLAGS -Wno-unused-parameter" 162 CFLAGS="$CFLAGS -Wno-unused-parameter"
159 # 4.2.1 shows the warning in wrong places 163 # 4.2.1 shows the warning in wrong places
160 #CFLAGS="$CFLAGS -Wunreachable-code" 164 #CFLAGS="$CFLAGS -Wunreachable-code"
161 165
162 # deprecated system OpenSSL library on OS X 166 # deprecated system OpenSSL library on OS X
163 if [ "$NGX_SYSTEM" = "Darwin" ]; then 167 if [ "$NGX_SYSTEM" = "Darwin" ]; then
164 CFLAGS="$CFLAGS -Wno-deprecated-declarations" 168 CFLAGS="$CFLAGS -Wno-deprecated-declarations"
165 fi 169 fi
166 ;;
167
168 *)
169 # we have a lot of the unused function arguments
170 CFLAGS="$CFLAGS -Wno-unused"
171 ;; 170 ;;
172 esac 171 esac
173 172
174 173
175 # stop on warning 174 # stop on warning