From: Marcel Raad Date: Fri, 16 Jun 2017 12:08:28 +0000 (+0200) Subject: curl-compilers.m4: enable missing-variable-declarations clang warning X-Git-Tag: curl-7_55_0~175 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32ec3063df81161f87ef8eca6f3c7c78e19baff9;p=thirdparty%2Fcurl.git 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 --- diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 7d53953c91..9efe2ae235 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"