Commit 8ce2ec7a authored by Max Kellermann's avatar Max Kellermann

client, event_pipe: explicitly ignore the write() result

On both locations, the result of write() can be ignored safely. In event_pipe_emit_fast(), that can only be "EAGAIN", which means that the pipe buffer is full - no further notification required. In client_init(), that would be a fatal connection error, which would be caught by the next event. This patch fixes gcc warnings.
parent a96bec36
......@@ -205,7 +205,7 @@ static void client_init(struct client *client, int fd)
client->permission = getDefaultPermissions();
write(fd, GREETING, sizeof(GREETING) - 1);
(void)write(fd, GREETING, sizeof(GREETING) - 1);
}
static void free_cmd_list(GSList *list)
......
......@@ -149,5 +149,5 @@ void event_pipe_emit_fast(enum pipe_event event)
assert((unsigned)event < PIPE_EVENT_MAX);
pipe_events[event] = true;
write(event_pipe[1], "", 1);
(void)write(event_pipe[1], "", 1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment