mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-25 04:40:05 +01:00
test: shut up compiler warning
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>
This commit is contained in:
parent
982866824c
commit
2ad8980c5a
1 changed files with 1 additions and 1 deletions
|
|
@ -184,7 +184,7 @@ START_TEST(test_double_syn_dropped_event)
|
|||
/* 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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue