mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibC+Utilities: Add gnu::format
attributes
Without these attributes present on these custom formatting functions, Clang would warn use about nonliteral format strings. As an added bonus, we now get type checking on these.
This commit is contained in:
parent
e8e628de57
commit
98260c5862
Notes:
sideshowbarker
2024-07-18 10:05:48 +09:00
Author: https://github.com/BertalanD
Commit: 98260c5862
Pull-request: https://github.com/SerenityOS/serenity/pull/8470
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gunnarbeutner ✅
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
bool g_there_was_an_error = false;
|
||||
|
||||
[[noreturn]] static void fatal_error(const char* format, ...)
|
||||
[[noreturn, gnu::format(printf, 1, 2)]] static void fatal_error(const char* format, ...)
|
||||
{
|
||||
fputs("\033[31m", stderr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue