From 26a2b2c8b93bef6c2140dbff0ace309bf6932bab Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 16 Dec 2024 17:10:04 -0500 Subject: [PATCH] rgw/posix: std::ignore return value of write() /ceph/src/rgw/driver/posix/notify.h: In member function 'void file::listing::Inotify::signal_shutdown()': /ceph/src/rgw/driver/posix/notify.h:215:19: error: ignoring return value of 'ssize_t write(int, const void*, size_t)' declared with attribute 'warn_unused_result' [-Werror=unused-result] 215 | (void) write(efd, &msg, sizeof(uint64_t)); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors Fixes: https://tracker.ceph.com/issues/69241 Signed-off-by: Casey Bodley (cherry picked from commit a2ebc00a56fcffc57b04fad1e5d134f75ae753eb) --- src/rgw/driver/posix/notify.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/driver/posix/notify.h b/src/rgw/driver/posix/notify.h index 9f6088a893af7..4463abc57c2e9 100644 --- a/src/rgw/driver/posix/notify.h +++ b/src/rgw/driver/posix/notify.h @@ -212,7 +212,7 @@ namespace file::listing { void signal_shutdown() { uint64_t msg{sig_shutdown}; - (void) write(efd, &msg, sizeof(uint64_t)); + std::ignore = write(efd, &msg, sizeof(uint64_t)); } friend class Notify; -- 2.39.5