[glib/glib-2-58: 30/55] Tests: Fix -Wformat-nonliteral causing build failure with clang



commit 5038346035e766e58f797688e6ccfc1476606a00
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Thu Sep 20 09:36:20 2018 -0400

    Tests: Fix -Wformat-nonliteral causing build failure with clang

 tests/unicode-encoding.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/tests/unicode-encoding.c b/tests/unicode-encoding.c
index 8ac4f9522..80427bd86 100644
--- a/tests/unicode-encoding.c
+++ b/tests/unicode-encoding.c
@@ -9,6 +9,8 @@
 
 static gint exit_status = 0;
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 static void
 croak (char *format, ...)
 {
@@ -32,6 +34,7 @@ fail (char *format, ...)
 
   exit_status |= 1;
 }
+#pragma GCC diagnostic pop
 
 typedef enum
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]