mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 20:30:27 +01:00
timer: fix coverity warning about unused return value
"read(int, void *, size_t)" returns the number of bytes read, but it is ignored. We don't really care about the number of bytes, but let's complain if we get anything but EAGAIN. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
893fdf9b83
commit
217ab899cf
1 changed files with 7 additions and 1 deletions
|
|
@ -102,8 +102,14 @@ libinput_timer_handler(void *data)
|
|||
struct libinput_timer *timer, *tmp;
|
||||
uint64_t now;
|
||||
uint64_t discard;
|
||||
int r;
|
||||
|
||||
read(libinput->timer.fd, &discard, sizeof(discard));
|
||||
r = read(libinput->timer.fd, &discard, sizeof(discard));
|
||||
if (r == -1 && errno != EAGAIN)
|
||||
log_bug_libinput(libinput,
|
||||
"Error %d reading from timerfd (%s)",
|
||||
errno,
|
||||
strerror(errno));
|
||||
|
||||
now = libinput_now(libinput);
|
||||
if (now == 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue