[PATCH 1/3] litest-alps-semi-mt: Fix compiler warnings

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 2 20:35:37 PDT 2014


On Tue, Sep 02, 2014 at 04:34:48PM +0200, Hans de Goede wrote:
> This fixes the following (false positive) compiler warnings:
> 
> litest-alps-semi-mt.c: In function 'alps_touch_move':
> litest-alps-semi-mt.c:163:3: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    send_abs_mt_xy(d, r, b);
>    ^
> litest-alps-semi-mt.c:163:3: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
> litest-alps-semi-mt.c: In function 'alps_touch_down':
> litest-alps-semi-mt.c:127:3: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    send_abs_mt_xy(d, r, b);
>    ^
> litest-alps-semi-mt.c:127:3: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
> 
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---

merged, thanks.

Cheers,
   Peter



>  test/litest-alps-semi-mt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/litest-alps-semi-mt.c b/test/litest-alps-semi-mt.c
> index 943ca2d..12b93b8 100644
> --- a/test/litest-alps-semi-mt.c
> +++ b/test/litest-alps-semi-mt.c
> @@ -95,7 +95,7 @@ static void
>  alps_touch_down(struct litest_device *d, unsigned int slot, double x, double y)
>  {
>  	struct alps *alps = d->private;
> -	double t, l, r, b; /* top, left, right, bottom */
> +	double t, l, r = 0, b = 0; /* top, left, right, bottom */
>  
>  	if (d->ntouches_down > 2 || slot > 1)
>  		return;
> @@ -137,7 +137,7 @@ static void
>  alps_touch_move(struct litest_device *d, unsigned int slot, double x, double y)
>  {
>  	struct alps *alps = d->private;
> -	double t, l, r, b; /* top, left, right, bottom */
> +	double t, l, r = 0, b = 0; /* top, left, right, bottom */
>  
>  	if (d->ntouches_down > 2 || slot > 1)
>  		return;
> -- 
> 2.1.0
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list