Actions
Bug #63409
openrgw_file.cc:348:7: warning: ignoring temporary created by a constructor declared with 'nodiscard' attribute
% Done:
0%
Source:
Tags:
rgw_file backport_processed
Backport:
quincy reef
Regression:
No
Severity:
3 - minor
Reviewed:
Description
reported by Leonid Usov in #ceph-devel slack:
ceph/src/rgw/rgw_file.cc:348:7: warning: ignoring temporary created by a constructor declared with 'nodiscard' attribute [-Wunused-value] lock_guard(rgw_fh->mtx); ^~~~~~~~~~~~~~~~~~~~~~~
if ((rc == 0) && ((rc = req.get_ret()) == 0)) { lock_guard(rgw_fh->mtx); rgw_fh->set_atime(real_clock::to_timespec(real_clock::now())); *bytes_read = req.nread; }
could it be that the code is not protected? I think this is the case on the latest llvm compiler at least.
Actions