/
patch-git_02_1fea653
34 lines (29 loc) · 1.2 KB
/
patch-git_02_1fea653
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
From 1fea6530eeca06b0d8d15a9327f87063292e1e6d Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@debian.org>
Date: Fri, 3 Jun 2011 15:59:14 +0200
Subject: Silence gcc: report_{x, y} are getting initialized.
Get us rid of:
| CC acecad.lo
| acecad.c: In function 'USBReadInput':
| acecad.c:1052:43: warning: 'report_y' may be used uninitialized in this function [-Wuninitialized]
| acecad.c:1052:43: warning: 'report_x' may be used uninitialized in this function [-Wuninitialized]
Both code paths (with XORG_BOTCHED_INPUT or not) will lead report_x and
report_y to be set, but make sure the compiler stops guessing.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
diff --git a/src/acecad.c b/src/acecad.c
index f5a2213..1e2f0c0 100644
--- src/acecad.c
+++ src/acecad.c
@@ -919,7 +919,7 @@ USBReadInput (InputInfoPtr local)
int x = priv->acecadOldX;
int y = priv->acecadOldY;
int z = priv->acecadOldZ;
- int report_x, report_y;
+ int report_x = 0, report_y = 0;
int prox = priv->acecadOldProximity;
int buttons = priv->acecadOldButtons;
int is_core_pointer = 0;
--
cgit v0.10.2