From: Casey Bodley Date: Mon, 16 Dec 2024 22:10:04 +0000 (-0500) Subject: rgw/posix: std::ignore return value of write() X-Git-Tag: v20.0.0~493^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F61107%2Fhead;p=ceph.git 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 --- diff --git a/src/rgw/driver/posix/notify.h b/src/rgw/driver/posix/notify.h index 9f6088a893a..4463abc57c2 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;