From c74da481437ad468d14fba64e3163b6c92428a55 Mon Sep 17 00:00:00 2001 From: Justin Figueroa Date: Wed, 6 Apr 2022 09:14:49 -0400 Subject: [PATCH] Fix #1097, adds truncation warning suppression flags --- cmake/sample_defs/arch_build_custom.cmake | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/cmake/sample_defs/arch_build_custom.cmake b/cmake/sample_defs/arch_build_custom.cmake index 77fc54a64..a7ebb1a6b 100644 --- a/cmake/sample_defs/arch_build_custom.cmake +++ b/cmake/sample_defs/arch_build_custom.cmake @@ -26,13 +26,15 @@ # and uses the same warning options that are applied at the mission level. # add_compile_options( - -std=c99 # Target the C99 standard (without gcc extensions) - -pedantic # Issue all the warnings demanded by strict ISO C - -Wall # Warn about most questionable operations - -Wstrict-prototypes # Warn about missing prototypes - -Wwrite-strings # Warn if not treating string literals as "const" - -Wpointer-arith # Warn about suspicious pointer operations - -Wcast-align # Warn about casts that increase alignment requirements - -Werror # Treat warnings as errors (code should be clean) + -std=c99 # Target the C99 standard (without gcc extensions) + -pedantic # Issue all the warnings demanded by strict ISO C + -Wall # Warn about most questionable operations + -Wstrict-prototypes # Warn about missing prototypes + -Wwrite-strings # Warn if not treating string literals as "const" + -Wpointer-arith # Warn about suspicious pointer operations + -Wcast-align # Warn about casts that increase alignment requirements + -Werror # Treat warnings as errors (code should be clean) + -Wno-format-truncation # Inhibit printf-style format truncation warnings + -Wno-stringop-truncation # Inhibit string operation truncation warnings )