[PATCH xf86-input-acecad] Address compiler warnings - uninitialized use.
Trevor Woerner
twoerner at gmail.com
Mon Jan 17 20:29:56 PST 2011
From: Trevor Woerner <twoerner at gmail.com>
When compiling prior to this patch, the following warnings are produced:
'report_x' may be used uninitialized in this function
'report_y' may be used uninitialized in this function
Signed-off-by: Trevor Woerner <twoerner at gmail.com>
---
I don't know if this is the correct fix and have no means by which to test
these changes. However I'm guessing this might be better than using those
variables uninitialized (which is entirely possible if 'prox' is false).
src/acecad.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/acecad.c b/src/acecad.c
index 6259f21..6040b99 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -1000,14 +1000,15 @@ USBReadInput (InputInfoPtr local)
continue;
}
- if (prox)
- {
#if XORG_BOTCHED_INPUT
- ConvertProc(local, 0, 3, x, y, 0, 0, 0, 0, &report_x, &report_y);
+ ConvertProc(local, 0, 3, x, y, 0, 0, 0, 0, &report_x, &report_y);
#else
- report_x = x;
- report_y = y;
+ report_x = x;
+ report_y = y;
#endif
+
+ if (prox)
+ {
if (!(priv->acecadOldProximity))
if (!is_core_pointer)
{
--
1.7.4.rc2
More information about the xorg-devel
mailing list