When building with Cygwin or MinGW, libtool uses a wrapper executable
instead of a wrapper script [1], which is written in C and throws
missing-variable-declarations warnings. Don't enable these warnings on
Cygwin and MinGW in order to avoid warnings for every executable built,
which spams the test suite output when using Cygwin's clang.
[1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html
Closes https://github.com/curl/curl/pull/1665
#
dnl Only clang 3.2 or later
if test "$compiler_num" -ge "302"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations"
+ case $host_os in
+ cygwin* | mingw*)
+ dnl skip missing-variable-declarations warnings for cygwin and
+ dnl mingw because the libtool wrapper executable causes them
+ ;;
+ *)
+ tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations"
+ ;;
+ esac
fi
#
dnl Only clang 3.6 or later