[PATCH:xf86-input-acecad 2/6] Silence gcc: report_{x, y} are getting initialized.
Cyril Brulebois
kibi at debian.org
Wed May 4 17:04:08 PDT 2011
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.
Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
src/acecad.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/acecad.c b/src/acecad.c
index f5a2213..1e2f0c0 100644
--- a/src/acecad.c
+++ b/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;
--
1.7.4.4
More information about the xorg-devel
mailing list