Project

General

Profile

Actions

Bug #69241

closed

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

Added by John Mulligan over 1 year ago. Updated 5 months ago.

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

0%

Source:
Backport:
squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
posix backport_processed
Fixed In:
v19.3.0-6571-g8c4f592eec
Released In:
v20.2.0~1454
Upkeep Timestamp:
2025-11-01T01:29:46+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 open1 closed)

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

Updated by Casey Bodley over 1 year ago

  • 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
Actions #2

Updated by Casey Bodley over 1 year ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Upkeep Bot over 1 year ago

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

Updated by Upkeep Bot over 1 year ago

  • Tags (freeform) changed from posix to posix backport_processed
Actions #5

Updated by Adam Emerson 12 months ago

  • Status changed from Pending Backport to Resolved
Actions #6

Updated by Upkeep Bot 8 months ago

  • 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
Actions #7

Updated by Upkeep Bot 8 months ago

  • 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
Actions #8

Updated by Upkeep Bot 5 months ago

  • 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
Actions

Also available in: Atom PDF