From: Masatake YAMATO Date: Thu, 18 May 2023 15:14:21 +0000 (+0900) Subject: test_mkfds: avoid "ignoring return value of ‘write’ declared with attribute ‘warn_unu... X-Git-Tag: v2.40-rc1~458^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=babcf0896c64e4c947fb5fe23e9b1b3b59a912e7;p=thirdparty%2Futil-linux.git test_mkfds: avoid "ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’" Signed-off-by: Masatake YAMATO --- diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index 540fc50240..4cd29f26dc 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -327,10 +327,11 @@ static void close_fdesc(int fd, void *data _U_) close(fd); } +volatile ssize_t unused_result_ok; static void abort_with_child_death_message(int signum _U_) { const char msg[] = "the child process exits unexpectedly"; - (void)write(2, msg, sizeof(msg)); + unused_result_ok = write(2, msg, sizeof(msg)); _exit(EXIT_FAILURE); }