From: Tim-Philipp Müller Date: Mon, 28 Sep 2015 15:01:55 +0000 (+0100) Subject: check: fix 'format string is not a string literal' warning with clang X-Git-Tag: 1.10.4~761 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d3c58902fdecfdd4e8148a59e5ce5a10edca1c8;p=platform%2Fupstream%2Fgstreamer.git check: fix 'format string is not a string literal' warning with clang Broke this when I removed the G_GNUC_PRINTF in a previous commit to fix indentation, since it was not really needed. Turns out unlike gcc clang warns though if a non-literal format string is passed then. Fix indentation differently. http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format --- diff --git a/libs/gst/check/gstcheck.c b/libs/gst/check/gstcheck.c index 1095bcc..1022214 100644 --- a/libs/gst/check/gstcheck.c +++ b/libs/gst/check/gstcheck.c @@ -1015,8 +1015,11 @@ gst_check_object_destroyed_on_unref (gpointer object_to_unref) } /* For ABI compatibility with GStreamer < 1.5 */ +/* *INDENT-OFF* */ void -_fail_unless (int result, const char *file, int line, const char *expr, ...); +_fail_unless (int result, const char *file, int line, const char *expr, ...) +G_GNUC_PRINTF (4, 5); +/* *INDENT-ON* */ void _fail_unless (int result, const char *file, int line, const char *expr, ...)