Commit b9e4638b authored by Peter Hutterer's avatar Peter Hutterer

test: fix a compiler warning about uninitialized variable

Flow is so this cannot be unset, we'd abort if we never get an event. The
compiler doesn't know that though.

In file included from tablet.c:35:0:
tablet.c: In function ‘motion’:
litest.h:202:45: warning: ‘last_reported_y’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
  ck_assert_int_lt((int)(a_ * 256), (int)(b_ * 256))
                                             ^
tablet.c:158:26: note: ‘last_reported_y’ was declared here
  double last_reported_x, last_reported_y;
                          ^
In file included from tablet.c:35:0:
litest.h:208:45: warning: ‘last_reported_x’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
  ck_assert_int_gt((int)(a_ * 256), (int)(b_ * 256))
                                             ^
tablet.c:158:9: note: ‘last_reported_x’ was declared here
  double last_reported_x, last_reported_y;
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent f571ccc8
......@@ -155,7 +155,7 @@ START_TEST(motion)
struct libinput_event_tablet *tablet_event;
struct libinput_event *event;
int test_x, test_y;
double last_reported_x, last_reported_y;
double last_reported_x = 0, last_reported_y = 0;
enum libinput_event_type type;
struct axis_replacement axes[] = {
{ ABS_DISTANCE, 10 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment