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.
Updated by Matt Benjamin 6 months ago
- Status changed from New to Fix Under Review
- Pull request ID set to 54309
Updated by Casey Bodley 6 months ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to quincy reef
Updated by Backport Bot 6 months ago
- Copied to Backport #63423: reef: rgw_file.cc:348:7: warning: ignoring temporary created by a constructor declared with 'nodiscard' attribute added
Updated by Backport Bot 6 months ago
- Copied to Backport #63424: quincy: rgw_file.cc:348:7: warning: ignoring temporary created by a constructor declared with 'nodiscard' attribute added
Updated by Backport Bot 6 months ago
- Tags changed from rgw_file to rgw_file backport_processed
Actions