Skip to content

Commit ea5fade

Browse files
committed
test: simple-xinit: ignore compiler warning on write()
This warning doesn't matter in this case: > ../test/simple-xinit.c: In function ‘handle_sigchld’: > ../test/simple-xinit.c:69:5: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] > 69 | write(server_displayfd, server_dead, strlen(server_dead)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to allow building w/ -Werror, it should be suppressed. Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
1 parent f609b18 commit ea5fade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/simple-xinit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static const char *server_dead = "server_dead";
6666
static void
6767
handle_sigchld(int sig)
6868
{
69-
write(server_displayfd, server_dead, strlen(server_dead));
69+
(void)write(server_displayfd, server_dead, strlen(server_dead));
7070
}
7171

7272
/* Starts the X server, returning its pid. */

0 commit comments

Comments
 (0)