input: Fix release/debugoptimized build warning with gcc

Fix ‘old_sx’ and ‘old_sy’ used uninitialized.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2024-02-23 15:44:13 +01:00 committed by Daniel Stone
parent 53cc781701
commit 8c2d47f86d
1 changed files with 3 additions and 0 deletions

View File

@ -572,6 +572,9 @@ weston_pointer_send_motion(struct weston_pointer *pointer,
surf_pos = weston_coord_global_to_surface(pointer->focus, pos);
pointer->sx = wl_fixed_from_double(surf_pos.c.x);
pointer->sy = wl_fixed_from_double(surf_pos.c.y);
} else {
old_sx = -1000000;
old_sy = -1000000;
}
weston_pointer_move(pointer, event);