From cde144233b8163dec69a86a757a0d37801ffe14a Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 17 May 2025 17:19:18 -0400 Subject: [PATCH] misc: Suppress -Wformat-security when building with GCC7 Making splash -> splashf means its arguments are now checked at compile time, but the "format" is nearly always one of our virtual pointers instead of a string/format literal. Our gcc494 (and upcoming gcc950) toolchains handle this fine, but simulator builds with gcc7 complain about this, so suppress the warning for those environments. (GCC 12, GCC 14, and GCC15 all seem to be okay with this too) Change-Id: Ifaf061f14e2552db73a7515f61950ad83116e8b5 --- firmware/include/gcc_extensions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/include/gcc_extensions.h b/firmware/include/gcc_extensions.h index 9b34e57b9b..c122a05737 100644 --- a/firmware/include/gcc_extensions.h +++ b/firmware/include/gcc_extensions.h @@ -24,7 +24,7 @@ /* Support for some GCC extensions */ /* Compile time check of format for printf/scanf like functions */ -#ifdef __GNUC__ +#ifdef __GNUC__ && __GNUC__ != 7 #define ATTRIBUTE_PRINTF(fmt, arg1) __attribute__( ( format( printf, fmt, arg1 ) ) ) #define ATTRIBUTE_SCANF(fmt, arg1) __attribute__( ( format( scanf, fmt, arg1 ) ) ) #else