From: Peter Hutterer Date: Tue, 18 Mar 2014 03:58:18 +0000 (+1000) Subject: test: shut up compiler warning X-Git-Tag: libevdev-1.0.99.2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ad8980c5a7df736d84b8acc931101d2a16ade5e;p=platform%2Fupstream%2Flibevdev.git 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 Reviewed-by: Benjamin Tissoires --- 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));