Commit 6b0b4381 authored by Simon McVittie's avatar Simon McVittie

Tests: Mark printf wrappers with G_GNUC_PRINTF

If we tell clang that we're passing the arguments on to a compatible
printf call, it can see that we're doing it right, and won't warn us
about -Wformat-nonliteral. This follows up from commit abac67c0.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent b71d7e4b
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
static gint exit_status = 0; static gint exit_status = 0;
#pragma GCC diagnostic push G_GNUC_PRINTF (1, 2)
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static void static void
croak (char *format, ...) croak (char *format, ...)
{ {
...@@ -23,6 +22,7 @@ croak (char *format, ...) ...@@ -23,6 +22,7 @@ croak (char *format, ...)
exit (1); exit (1);
} }
G_GNUC_PRINTF (1, 2)
static void static void
fail (char *format, ...) fail (char *format, ...)
{ {
...@@ -34,7 +34,6 @@ fail (char *format, ...) ...@@ -34,7 +34,6 @@ fail (char *format, ...)
exit_status |= 1; exit_status |= 1;
} }
#pragma GCC diagnostic pop
typedef enum typedef enum
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment