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
This commit is contained in:
Solomon Peachy 2025-05-17 17:19:18 -04:00
parent 622ff574e7
commit cde144233b

View file

@ -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