Skip to contentSkip to conversation

config-parser: Use matching printf format

PATCH Applied Khem Raj 2 participants 2 messages Jan 13, 2016 – Jan 18, 2016

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 config-parser: Use matching printf format

XML_GetCurrentLineNumber() returns unsigned long as clang is telling us here

src/config-parser.c:603:6: warning: format specifies type 'int' but the argument has type 'XML_Size' (aka 'unsigned long') [-Wformat]

            XML_GetCurrentLineNumber(p),
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 src/config-parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/config-parser.c +1 -1
index b006f19..15a973e 100644
@@ -598,7 +598,7 @@ mb_kbd_config_load(MBKeyboard *kbd, char *variant)
 
   if (! XML_Parse(p, data, strlen(data), 1)) {
     fprintf(stderr, 
-	    "matchbox-keyboard:%s:%d: XML Parse error:%s\n",
+	    "matchbox-keyboard:%s:%lu: XML Parse error:%s\n",
 	    kbd->config_file,
 	    XML_GetCurrentLineNumber(p),
 	    XML_ErrorString(XML_GetErrorCode(p)));
Signature · 1 line
2.7.0
Applied
#1 lore raw
Quoted 10 lines · Khem Raj

XML_GetCurrentLineNumber() returns unsigned long as clang is telling us here

src/config-parser.c:603:6: warning: format specifies type 'int' but the argument has type 'XML_Size' (aka 'unsigned long') [-Wformat]

            XML_GetCurrentLineNumber(p),
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Merged to matchbox-keyboard 0.1 branch, thanks.

Ross