test-libevdev-events.c: In function ‘test_double_syn_dropped_event’:
test-libevdev-events.c:187:2: warning: ignoring return value of ‘read’,
declared with attribute warn_unused_result [-Wunused-result]
This read was there to drain events even when there shouldn't be any on the
pipe anyway. So let's add an assert.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
/* sneak in a button change event while we're not looking, this way
* the sync queue contains 2 events: BTN_LEFT and SYN_REPORT. */
uinput_device_event(uidev, EV_KEY, BTN_LEFT, 0);
- read(pipefd[0], &ev, sizeof(ev));
+ ck_assert_int_eq(read(pipefd[0], &ev, sizeof(ev)), -1);
libevdev_change_fd(dev, uinput_device_get_fd(uidev));