[PATCH libevdev 1/3] test: silence some valgrind warnings
Peter Hutterer
peter.hutterer at who-t.net
Wed Apr 23 22:50:13 PDT 2014
ioctl points to uninitialized bytes - correct but we didn't use those anyway.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
test/test-libevdev-events.c | 1 +
test/test-libevdev-has-event.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/test-libevdev-events.c b/test/test-libevdev-events.c
index 4828933..0ada931 100644
--- a/test/test-libevdev-events.c
+++ b/test/test-libevdev-events.c
@@ -1601,6 +1601,7 @@ START_TEST(test_mt_slot_ranges_invalid)
ck_assert_int_eq(rc, 0);
libevdev_change_fd(dev, pipefd[0]);
+ memset(ev, 0, sizeof(ev));
ev[0].type = EV_ABS;
ev[0].code = ABS_MT_SLOT;
ev[0].value = num_slots;
diff --git a/test/test-libevdev-has-event.c b/test/test-libevdev-has-event.c
index fd7e118..3ac41f1 100644
--- a/test/test-libevdev-has-event.c
+++ b/test/test-libevdev-has-event.c
@@ -712,6 +712,7 @@ START_TEST(test_device_set_abs)
ck_assert_int_eq(libevdev_get_abs_resolution(dev, ABS_X), 80);
ck_assert_int_eq(libevdev_get_abs_resolution(dev, ABS_Y), 150);
+ a.value = 0;
a.minimum = 10;
a.maximum = 100;
a.fuzz = 13;
@@ -941,7 +942,7 @@ START_TEST(test_device_kernel_change_axis_invalid)
abs.maximum = 1000;
abs.fuzz = 1;
abs.flat = 2;
- /* abs.resolution = 3; FIXME: can't test resolution */
+ abs.resolution = 3; /* FIXME: value is unused, we can't test resolution */
abs.value = 0;
uinput_device_set_abs_bit(uidev, ABS_X, &abs);
--
1.9.0
More information about the Input-tools
mailing list