summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-05-03 17:02:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-05 10:39:01 +1000
commitea0db37521c0fce8599c1838e9a919bb3292d413 (patch)
treeefb1b10e990454c73978588404ccd65fff829692 /src
parentca5d977e5c5f8a951321edeed7e69f8ed1ec53d3 (diff)
Silence compiler warning
Static analysis claims that ptr += size may assign garbage. But since the protocol requires format to be 8, 16 or 32, size should always have a valid value. Initialize to 0 to shut up clang. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src')
-rw-r--r--src/property.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/property.c b/src/property.c
index f8b21c7..87f9fc6 100644
--- a/src/property.c
+++ b/src/property.c
@@ -59,7 +59,7 @@ print_property(Display *dpy, XDevice* dev, Atom property)
int act_format;
unsigned long nitems, bytes_after;
unsigned char *data, *ptr;
- int j, done = False, size;
+ int j, done = False, size = 0;
name = XGetAtomName(dpy, property);
printf("\t%s (%ld):\t", name, property);