diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-09-07 10:52:48 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-09-08 13:53:02 +0200 |
commit | 17fcdf6a310d4c80762455ee9d5e4f52bd55c809 (patch) | |
tree | 747916b49eb0913ab3405ecb3b4484ad104e77d9 /m4 | |
parent | ad425d3e3e2e9b5325332f4b883cdcb23e3f071e (diff) | |
download | curl-17fcdf6a310d4c80762455ee9d5e4f52bd55c809.tar.gz |
lib: fix -Wassign-enum warnings
configure --enable-debug now enables -Wassign-enum with clang,
identifying several enum "abuses" also fixed.
Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/879007f8118771f4896334731aaca5850a154675#commitcomment-42087553
Closes #5929
Diffstat (limited to 'm4')
-rw-r--r-- | m4/curl-compilers.m4 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index b0d5d4213..7d59f0667 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -945,6 +945,10 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs" fi fi + dnl clang 7 or later + if test "$compiler_num" -ge "700"; then + CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [assign-enum]) + fi fi ;; # |