From fd445659296fea2a177c4e06398bb61abda16cc4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 27 Apr 2024 13:31:36 +0200 Subject: [PATCH] build: make `-Wsign-conversion` an error (OpenSSF) Before this patch, cmake/autotools builds made an exception for this warning to not cause an error. The codebase is warning-free now, so this patch deletes this exception. Follow-up [...] Follow-up to3829759bd042c03225ae862062560f568ba1a231 #12489 Closes #xxxxx --- CMake/PickyWarnings.cmake | 1 - m4/curl-compilers.m4 | 2 -- 2 files changed, 3 deletions(-) diff --git a/CMake/PickyWarnings.cmake b/CMake/PickyWarnings.cmake index d1183fe392a4b8..3c96f3c33f0869 100644 --- a/CMake/PickyWarnings.cmake +++ b/CMake/PickyWarnings.cmake @@ -98,7 +98,6 @@ if(PICKY_COMPILER) -Wold-style-definition # clang 2.7 gcc 3.4 -Wredundant-decls # clang 2.7 gcc 4.1 -Wsign-conversion # clang 2.9 gcc 4.3 - -Wno-error=sign-conversion # FIXME -Wstrict-prototypes # clang 1.0 gcc 3.3 # -Wswitch-enum # clang 2.7 gcc 4.1 # Not used because this basically disallows default case -Wtype-limits # clang 2.7 gcc 4.3 diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 9a4547709eb1cd..8feb4c5064d9b7 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -831,7 +831,6 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ dnl Only clang 2.9 or later if test "$compiler_num" -ge "209"; then CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-conversion]) - tmp_CFLAGS="$tmp_CFLAGS -Wno-error=sign-conversion" # FIXME CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-sign-overflow]) # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [padded]) # Not used because we cannot change public structs fi @@ -1023,7 +1022,6 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [clobbered ignored-qualifiers]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [conversion trampolines]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-conversion]) - tmp_CFLAGS="$tmp_CFLAGS -Wno-error=sign-conversion" # FIXME CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [vla]) dnl required for -Warray-bounds, included in -Wall tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"