]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
log: ignore return value of write in unit test
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 13 Jan 2025 21:08:12 +0000 (16:08 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 13 Jan 2025 21:10:52 +0000 (16:10 -0500)
Fix building a unit test with -Werror enabled.
Based on cbodley's fix for a similar build failure.

Based-on: a2ebc00a56fcffc57b04fad1e5d134f75ae753eb
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/log/test.cc

index 08ba5bff6afb75550c80370451d61b29255e556c..786ba3095827d02e087e1037de788f360362fe77 100644 (file)
@@ -191,7 +191,7 @@ static void readpipe(int fd, int verify)
         if (p == NULL) {
           _exit(2);
         } else if (p[1] != '\0') {
-          write(2, buf, strlen(buf));
+          std::ignore = write(2, buf, strlen(buf));
           _exit(3);
         }
       }