Project

General

Profile

Actions

Bug #69241

closed
JM CB

rgw/driver/posix/notify.h: failure to build with -Werror: ignoring return value

Bug #69241: rgw/driver/posix/notify.h: failure to build with -Werror: ignoring return value

Added by John Mulligan almost 2 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
posix
Fixed In:
v19.3.0-6571-g8c4f592eec
Released In:
v20.2.0~1454
Upkeep Timestamp:
2026-08-28T01:51:18+00:00

Description

I hit this as an error while trying to build on ubuntu 24.04 in a container. This environment has set -Werror by default. I can force -Werror off temporarily by hacking the build script (src/script/run-make.sh) but this isn't a good long term solution.

FAILED: src/rgw/CMakeFiles/rgw_common.dir/driver/posix/notify.cpp.o
/usr/bin/ccache /usr/bin/g++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_A
SIO_HAS_IO_URING -DBOOST_ASIO_NO_TS_EXECUTORS -DHAVE_CONFIG_H -DLMDB_SAFE_NO_CPP_UTI
LITIES -DXXH_NO_INLINE_HINTS=1 -D_ARROW_EXIST -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -
D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -I/ceph/bui
ld.u24x/src/include -I/ceph/src -I/ceph/src/rgw/services -I/ceph/src/rgw -I/usr/incl
ude/lua5.3 -I/ceph/src/rgw/driver/rados -I/ceph/src/dmclock/src -I/ceph/src/dmclock/
support/src -I/ceph/src/BLAKE3/c -I/ceph/src/rgw/store/rados -I/ceph/src/rgw/driver/
dbstore -isystem /ceph/build.u24x/boost/include -isystem /ceph/build.u24x/include -i
system /ceph/src/xxHash -isystem /ceph/src/fmt/include -isystem /ceph/build.u24x/src
/arrow/include -isystem /ceph/src/s3select/rapidjson/include -Og -Werror -std=c++20 
-fPIC -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel -Woverloaded-virtual -DCEPH_DEBUG_MUTEX -fstack-protector-strong -D_GLIBCXX_ASSERTIONS -fdiagnostics-color=auto -MD -MT src/rgw/CMakeFiles/rgw_common.dir/driver/posix/notify.cpp.o -MF src/rgw/CMakeFiles/rgw_common.dir/driver/posix/notify.cpp.o.d -o src/rgw/CMakeFiles/rgw_common.dir/driver/posix/notify.cpp.o -c /ceph/src/rgw/driver/posix/notify.cpp
In file included from /ceph/src/rgw/driver/posix/notify.cpp:4:
/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

While looking into this error I found https://stackoverflow.com/a/39618857 which may or may not be helpful.


Related issues 1 (0 open — 1 closed)

Copied to rgw - Backport #69317: squid: rgw/driver/posix/notify.h: failure to build with -Werror: ignoring return valueResolvedCasey Bodley

Actions

CB Updated by Casey Bodley almost 2 years ago Actions #1

  • Status changed from New to Fix Under Review
  • Assignee set to Casey Bodley
  • Backport set to squid
  • Pull request ID set to 61107
  • Tags (freeform) set to posix

CB Updated by Casey Bodley almost 2 years ago Actions #2

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot almost 2 years ago Actions #3

  • Copied to Backport #69317: squid: rgw/driver/posix/notify.h: failure to build with -Werror: ignoring return value added

UB Updated by Upkeep Bot almost 2 years ago Actions #4

  • Tags (freeform) changed from posix to posix backport_processed

AE Updated by Adam Emerson over 1 year ago Actions #5

  • Status changed from Pending Backport to Resolved

UB Updated by Upkeep Bot over 1 year ago Actions #6

  • Merge Commit set to 8c4f592eec9b1572688f853fb3c0e27431250d8b
  • Fixed In set to v19.3.0-6571-g8c4f592eec9
  • Upkeep Timestamp set to 2025-07-10T04:45:18+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #7

  • Fixed In changed from v19.3.0-6571-g8c4f592eec9 to v19.3.0-6571-g8c4f592eec
  • Upkeep Timestamp changed from 2025-07-10T04:45:18+00:00 to 2025-07-14T19:38:01+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #8

  • Released In set to v20.2.0~1454
  • Upkeep Timestamp changed from 2025-07-14T19:38:01+00:00 to 2025-11-01T01:29:46+00:00

UB Updated by Upkeep Bot 3 months ago Actions #9

  • Tags (freeform) changed from posix backport_processed to posix
  • Upkeep Timestamp changed from 2025-11-01T01:29:46+00:00 to 2026-08-28T01:51:18+00:00
Actions

Also available in: PDF Atom