projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75d1234
)
Fix sign of sscanf format specifiers
author
Stefan Weil
<sw@weilnetz.de>
Sat, 25 Feb 2012 13:11:46 +0000
(14:11 +0100)
committer
Stefan Hajnoczi
<stefanha@linux.vnet.ibm.com>
Wed, 7 Mar 2012 13:03:51 +0000
(13:03 +0000)
All values read by sscanf are unsigned, so replace %d by %u.
This signed / unsigned mismatch was detected by splint.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
cursor.c
patch
|
blob
|
history
diff --git
a/cursor.c
b/cursor.c
index efc5917029a311091b53f26b14d44c4672ad641d..76e262caf7b986e5aedb6e26a4886e2aca3d0797 100644
(file)
--- a/
cursor.c
+++ b/
cursor.c
@@
-15,7
+15,8
@@
static QEMUCursor *cursor_parse_xpm(const char *xpm[])
uint8_t idx;
/* parse header line: width, height, #colors, #chars */
- if (sscanf(xpm[line], "%d %d %d %d", &width, &height, &colors, &chars) != 4) {
+ if (sscanf(xpm[line], "%u %u %u %u",
+ &width, &height, &colors, &chars) != 4) {
fprintf(stderr, "%s: header parse error: \"%s\"\n",
__FUNCTION__, xpm[line]);
return NULL;