test: fix two coverity warnings

Alleged division by zero and use of an uninitialized variable. Both cannot
happen the way we call the tests, so let's just abort to make coverity happy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-07-08 09:47:31 +10:00
parent 6f6a9d95d5
commit cc908b68a9
2 changed files with 3 additions and 0 deletions

View file

@ -68,6 +68,7 @@ test_relative_event(struct litest_device *dev, double dx, double dy)
prop = udev_device_get_property_value(ud, "MOUSE_DPI");
if (prop) {
dpi = parse_mouse_dpi_property(prop);
ck_assert_int_ne(dpi, 0);
dx *= 1000.0/dpi;
dy *= 1000.0/dpi;

View file

@ -111,6 +111,8 @@ START_TEST(button_seat_count)
case BTN_0:
dev2 = litest_add_device(li, LITEST_DELL_CANVAS_TOTEM);
break;
default:
ck_abort();
}
litest_tablet_proximity_in(dev, 10, 10, axes);