]> git.ipfire.org Git - thirdparty/curl.git/commit
build: use -Wno-format-overflow
authorDaniel Stenberg <daniel@haxx.se>
Mon, 19 Aug 2024 12:17:55 +0000 (14:17 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 19 Aug 2024 21:20:45 +0000 (23:20 +0200)
commit145f87b9e89f3a5e287233fe7d3cf57aca23dd8c
treec4a64a71c190aa1b55902622e1c1bda1faeec72a
parentc2e814f8d7e892dea23f481751a27c532d4e2d0f
build: use -Wno-format-overflow

-Wformat-overflow is not a warning that we want enabled as it does not
help us. It can only bring us false positives since it warns on bad uses
of sprintf and vsprintf ("that might overflow the destination buffer").
Two functions we explicitly ban in curl code.

The only way this flag triggers warnings in curl code is false positives
for functions we have marked with the CURL_PRINTF() macro.

Further: it seems -Wformat-trunaction option might in turn also enable
-Wformat-overflow, so if this second option is used, we need to
explicitly set -Wno-format-overflow - not just skip setting
-Wformat-overflow.

Reported-by: Viktor Szakats
Fixes #14168
Closes #14598
CMake/PickyWarnings.cmake
m4/curl-compilers.m4