From d270085ef33a08a20ef3c17f886c3f60f50ce1c6 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 7 May 2016 11:22:47 -0400 Subject: [PATCH] trivial-httpd: Add __attribute__((format)) I was briefly looking at building with clang mostly since it detects unused variables with cleanup attributes, but then I hit this fatal error. It's a hard compile error with `-Wformat-nonliteral` since clang doesn't know it's a format string. --- src/ostree/ot-builtin-trivial-httpd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c index 0300b128..811e8924 100644 --- a/src/ostree/ot-builtin-trivial-httpd.c +++ b/src/ostree/ot-builtin-trivial-httpd.c @@ -56,6 +56,9 @@ static GOptionEntry options[] = { { NULL } }; +static void +httpd_log (OtTrivialHttpd *httpd, const gchar *format, ...) __attribute__ ((format(printf, 2, 3))); + static void httpd_log (OtTrivialHttpd *httpd, const gchar *format, ...) {