From a8961420dbf94bfa48372a3234be1c9db8a1c0ac Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 7 Feb 2023 13:19:08 +1000 Subject: [PATCH] test: fix compiler warning about possible loss of precision Let's make this a float division then to keep the compiler happy --- test/test-ei-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-ei-device.c b/test/test-ei-device.c index fad254a..6732030 100644 --- a/test/test-ei-device.c +++ b/test/test-ei-device.c @@ -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)); }