mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-21 18:00:37 +01:00
lid: mark the write return value as unused
Coverity doesn't understand the (void)write() bit and complains about the unused value. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
9d96f50c4d
commit
307f7c6344
1 changed files with 2 additions and 1 deletions
|
|
@ -78,13 +78,14 @@ lid_switch_keyboard_event(uint64_t time,
|
|||
return;
|
||||
|
||||
if (dispatch->reliability == RELIABILITY_WRITE_OPEN) {
|
||||
__attribute__((unused)) int rc;
|
||||
int fd = libevdev_get_fd(dispatch->device->evdev);
|
||||
struct input_event ev[2] = {
|
||||
{{ 0, 0 }, EV_SW, SW_LID, 0 },
|
||||
{{ 0, 0 }, EV_SYN, SYN_REPORT, 0 },
|
||||
};
|
||||
|
||||
(void)write(fd, ev, sizeof(ev));
|
||||
rc = write(fd, ev, sizeof(ev));
|
||||
/* In case write() fails, we sync the lid state manually
|
||||
* regardless. */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue