[glib/wip/pwithnall/error-tests-nonliteral] tests: Ignore -Wformat-nonliteral warning in new GError tests
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/error-tests-nonliteral] tests: Ignore -Wformat-nonliteral warning in new GError tests
- Date: Thu, 7 Jan 2021 15:48:22 +0000 (UTC)
commit 5000193cf3d05f2aae81d8d4df8b9d49ef2e8e53
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Jan 7 15:47:59 2021 +0000
tests: Ignore -Wformat-nonliteral warning in new GError tests
See !1861.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
glib/tests/error.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/glib/tests/error.c b/glib/tests/error.c
index f0001a429..cbf146a2e 100644
--- a/glib/tests/error.c
+++ b/glib/tests/error.c
@@ -121,6 +121,9 @@ test_new_valist_invalid_va (gpointer dummy,
va_start (ap, dummy);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+
g_test_expect_message (G_LOG_DOMAIN,
G_LOG_LEVEL_WARNING,
"*g_error_new_valist: runtime check failed*");
@@ -128,6 +131,8 @@ test_new_valist_invalid_va (gpointer dummy,
g_test_assert_expected_messages ();
g_assert_nonnull (error);
+#pragma GCC diagnostic pop
+
g_test_expect_message (G_LOG_DOMAIN,
G_LOG_LEVEL_WARNING,
"*g_error_copy: runtime check failed*");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]