curl-compilers.m4: enable missing-variable-declarations clang warning

It usually warns when forgetting to declare TU-local variables static.

Closes https://github.com/curl/curl/pull/1578
This commit is contained in:
Marcel Raad 2017-06-16 14:08:28 +02:00
parent b5c5909f30
commit 32ec3063df
No known key found for this signature in database
GPG Key ID: B4668817AE6D6CD4
1 changed files with 5 additions and 0 deletions

View File

@ -892,6 +892,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow"
fi
#
dnl Only clang 3.2 or later
if test "$compiler_num" -ge "302"; then
tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations"
fi
#
dnl Only clang 3.6 or later
if test "$compiler_num" -ge "306"; then
tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"