[PATCH libinput] Address gcc warnings on potentially uninitialized variables.

Peter Hutterer peter.hutterer at who-t.net
Sun May 31 16:55:17 PDT 2015


On Fri, May 29, 2015 at 06:40:25PM -0700, Jon A. Cruz wrote:
> Signed-off-by: Jon A. Cruz <jonc at osg.samsung.com>

merged, thanks.

turns out gcc at -O0 doesn't show the warnings...

Cheers,
   Peter

> ---
>  test/touch.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/touch.c b/test/touch.c
> index 2c07e09..be2bea9 100644
> --- a/test/touch.c
> +++ b/test/touch.c
> @@ -586,7 +586,8 @@ START_TEST(touch_initial_state)
>  {
>  	struct litest_device *dev;
>  	struct libinput *libinput1, *libinput2;
> -	struct libinput_event *ev1, *ev2;
> +	struct libinput_event *ev1 = NULL;
> +	struct libinput_event *ev2 = NULL;
>  	struct libinput_event_touch *t1, *t2;
>  	struct libinput_device *device1, *device2;
>  	int axis = _i; /* looped test */
> -- 
> 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