[PATCH xf86-input-acecad] Address compiler warnings - uninitialized use.
Peter Hutterer
peter.hutterer at who-t.net
Tue Jan 18 18:29:20 PST 2011
On Mon, Jan 17, 2011 at 11:29:56PM -0500, Trevor Woerner wrote:
> 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).
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> for both patches.
please push. btw, this driver hasn't seen any testing for I guess nearly 3
years, so your time may be better spent on other modules.
Cheers,
Peter
>
> 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