]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
test_mkfds: avoid "ignoring return value of ‘write’ declared with attribute ‘warn_unu...
authorMasatake YAMATO <yamato@redhat.com>
Thu, 18 May 2023 15:14:21 +0000 (00:14 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Thu, 18 May 2023 18:27:27 +0000 (03:27 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/helpers/test_mkfds.c

index 540fc50240c49375780906376aae3cbea02aafac..4cd29f26dcf1d4e1cc3be66da501c6194e83e7b3 100644 (file)
@@ -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);
 }