test: fix compiler warning about possible loss of precision

Let's make this a float division then to keep the compiler happy
This commit is contained in:
Peter Hutterer 2023-02-07 13:19:08 +10:00
parent f9d691e98b
commit a8961420db

View file

@ -1548,9 +1548,9 @@ MUNIT_TEST(test_passive_ei_device_pointer_abs)
uint32_t maxy = eis_region_get_y(r) + eis_region_get_height(r);
/* outside of pointer range, expect to be discarded */
eis_device_pointer_motion_absolute(device, maxx + 1, maxy/2);
eis_device_pointer_motion_absolute(device, maxx + 1, maxy/2.0);
eis_device_frame(device, peck_eis_now(peck));
eis_device_pointer_motion_absolute(device, maxx/2 , maxy + 1);
eis_device_pointer_motion_absolute(device, maxx/2.0 , maxy + 1);
eis_device_frame(device, peck_eis_now(peck));
}