check: fix 'format string is not a string literal' warning with clang
authorTim-Philipp Müller <tim@centricular.com>
Mon, 28 Sep 2015 15:01:55 +0000 (16:01 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 28 Sep 2015 19:10:31 +0000 (20:10 +0100)
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

libs/gst/check/gstcheck.c

index 1095bcc..1022214 100644 (file)
@@ -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, ...)