summaryrefslogtreecommitdiff
path: root/Userland/Utilities/test.cpp
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-07-06 06:29:49 +0200
committerGunnar Beutner <gunnar@beutner.name>2021-07-08 10:11:00 +0200
commit98260c586216909934abfe63beeebff3171f4479 (patch)
treecf47ca315155a22fdd9ae3c13e043bf409de4ff0 /Userland/Utilities/test.cpp
parente8e628de57789fea4c7266e71f7443fa70a75233 (diff)
downloadserenity-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.cpp2
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);