mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-20 22:04:32 +00:00
Add [[gnu::format(printf, 1, 2)]] attribute to variadic function sectError
This commit is contained in:
+2
-1
@@ -121,7 +121,8 @@ static std::vector<std::string> sectErrors;
|
||||
// `snprintf`; but passing `fmt` to `snprintf` triggers a `-Wformat-security` warning which we
|
||||
// can't prevent because GCC only supports the `[[gnu::format(printf, 1, 2)]]` attribute on
|
||||
// C-style variadic functions, not on variadic templates; so we have to use `vsnprintf`.
|
||||
void sectError(char const *fmt, ...) {
|
||||
[[gnu::format(printf, 1, 2)]]
|
||||
static void sectError(char const *fmt, ...) {
|
||||
std::string result;
|
||||
va_list args1, args2;
|
||||
va_start(args1, fmt);
|
||||
|
||||
Reference in New Issue
Block a user