diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-07-06 06:29:49 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-07-08 10:11:00 +0200 |
commit | 98260c586216909934abfe63beeebff3171f4479 (patch) | |
tree | cf47ca315155a22fdd9ae3c13e043bf409de4ff0 /Userland/Utilities/test.cpp | |
parent | e8e628de57789fea4c7266e71f7443fa70a75233 (diff) | |
download | serenity-98260c586216909934abfe63beeebff3171f4479.zip |
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.
Diffstat (limited to 'Userland/Utilities/test.cpp')
-rw-r--r-- | Userland/Utilities/test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/test.cpp b/Userland/Utilities/test.cpp index a868348411..f662c8d259 100644 --- a/Userland/Utilities/test.cpp +++ b/Userland/Utilities/test.cpp @@ -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); |