aboutsummaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-gnome/bonobo/files/0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch
blob: e9aebb853e1f6e2fd76bdd53e5615e5c174c761a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From b75879e8c3e24d338c0e5843d616bc9b02da4d04 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 26 Aug 2017 09:52:17 -0700
Subject: [PATCH] bonobo-ui-node: qualify functions with G_GNUC_PRINTF

This helps compiler in doing format checking correctly
Fixes
bonobo-ui-node.c:864:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
|         g_logv   ("XML", G_LOG_LEVEL_ERROR, msg, args);

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 bonobo/bonobo-ui-node.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bonobo/bonobo-ui-node.c b/bonobo/bonobo-ui-node.c
index 9bab5e5..6ec66e2 100644
--- a/bonobo/bonobo-ui-node.c
+++ b/bonobo/bonobo-ui-node.c
@@ -835,7 +835,7 @@ uiCharacters (ParseState *ps, const xmlChar *chars, int len)
 	g_string_append_len (ps->content, chars, len);
 }
 
-static void
+static G_GNUC_PRINTF(2, 3) void
 uiWarning (ParseState *ps, const char *msg, ...)
 {
 	va_list args;
@@ -845,7 +845,7 @@ uiWarning (ParseState *ps, const char *msg, ...)
 	va_end   (args);
 }
 
-static void
+static G_GNUC_PRINTF(2, 3) void
 uiError (ParseState *ps, const char *msg, ...)
 {
 	va_list args;
@@ -855,7 +855,7 @@ uiError (ParseState *ps, const char *msg, ...)
 	va_end   (args);
 }
 
-static void
+static G_GNUC_PRINTF(2, 3) void
 uiFatalError (ParseState *ps, const char *msg, ...)
 {
 	va_list args;
-- 
2.14.1