[glib: 10/11] Tests: Fix -Wformat-nonliteral causing build failure with clang



commit abac67c050c1e795035a1d691a87817b7f41dab7
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]