summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2017-06-16 14:08:28 +0200
committerMarcel Raad <raad@teamviewer.com>2017-06-16 22:32:05 +0200
commit32ec3063df81161f87ef8eca6f3c7c78e19baff9 (patch)
treeb01dee2afb21531be553cb03350c749a2589036b
parentb5c5909f30ea68a1528b1fe24871b2e49a01f119 (diff)
downloadcurl-32ec3063df81161f87ef8eca6f3c7c78e19baff9.tar.gz
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
-rw-r--r--m4/curl-compilers.m45
1 files changed, 5 insertions, 0 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 7d53953c9..9efe2ae23 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -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"