mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-24 18:10:06 +01:00
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:
parent
6f6a9d95d5
commit
cc908b68a9
2 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue