summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-03-18 13:58:18 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-03-19 09:36:41 +1000
commit2ad8980c5a7df736d84b8acc931101d2a16ade5e (patch)
tree8793c4ee9274c2fb4ef52f19ff3e88aa612ddfe0
parent982866824cb471153670139905c7217e0ef62e75 (diff)
downloadlibevdev-2ad8980c5a7df736d84b8acc931101d2a16ade5e.tar.gz
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>
-rw-r--r--test/test-libevdev-events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test-libevdev-events.c b/test/test-libevdev-events.c
index 56f21a6..de598f9 100644
--- a/test/test-libevdev-events.c
+++ b/test/test-libevdev-events.c
@@ -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));