Skip to content

Commit

Permalink
curl-compilers.m4: disable warning spam with Cygwin's clang
Browse files Browse the repository at this point in the history
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 curl#1665
  • Loading branch information
MarcelRaad committed Jul 10, 2017
1 parent af02162 commit deadb23
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion m4/curl-compilers.m4
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,15 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
#
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
Expand Down

0 comments on commit deadb23

Please sign in to comment.