CMake: Disable Wformat-truncation (GCC warning)

Converting from GLib functions to stdio.h turns up many of these
warnings. They are disabled to allow work to go on and until
there is consensus on how to handle them.

    -Wformat-truncation
    -Wformat-truncation=1

        Level 1 of -Wformat-truncation enabled by -Wformat employs
        a conservative approach that warns only about calls to bounded
        functions whose return value is unused and that will most likely
        result in output truncation.
This commit is contained in:
João Valverde 2021-12-17 16:54:52 +00:00 committed by Wireshark GitLab Utility
parent b054f9aee6
commit 77f95e18ab
1 changed files with 7 additions and 0 deletions

View File

@ -661,6 +661,13 @@ else() # ! MSVC
# until these procedural issues can be fixed or at least mitigated.
#
-Wno-error=maybe-uninitialized
#
# Converting from g_printf() and g_snprintf() to stdio.h turns
# up many of these warnings. They will have to be handled later.
# It can be a lot of work to fix properly and none of them
# seem to flag very interesting issues.
#
-Wno-format-truncation
)
#