summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-05-03 17:05:45 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-05 10:39:01 +1000
commitbdcb5b2a1b547059cf75b8337f854dbb136705f6 (patch)
tree1b60c3a2d63c689bb758fe5a1f274ccb57ef96d6 /src
parentea0db37521c0fce8599c1838e9a919bb3292d413 (diff)
Initialize a few more values to defaults.
If we ever print <undefined> for those, we have a buggy X server that's breaking the protocol. Until that happens this is just to shut up clang. All three are assigned constant strings only, no free() needed. 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/test_xi2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test_xi2.c b/src/test_xi2.c
index 5b56397..3c3fee3 100644
--- a/src/test_xi2.c
+++ b/src/test_xi2.c
@@ -99,7 +99,7 @@ static void print_hierarchychangedevent(XIHierarchyEvent *event)
for (i = 0; i < event->num_info; i++)
{
- char *use;
+ char *use = "<undefined>";
switch(event->info[i].use)
{
case XIMasterPointer: use = "master pointer"; break;
@@ -149,7 +149,8 @@ static void print_rawevent(XIRawEvent *event)
static void print_enterleave(XILeaveEvent* event)
{
- char *mode, *detail;
+ char *mode = "<undefined>",
+ *detail = "<undefined>";
int i;
printf(" device: %d (%d)\n", event->deviceid, event->sourceid);