Actions
Bug #51934
closedrgw-multisite: metadata conflict not computed correctly
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Description
The code below causes a compiler warning about a potentially uninitialized variable `_mode`. Looking at it, the problem may be deeper. The "++i" conditional looks like it will never be executed.
int i = 0;
for (auto& iter : iters) {
auto& rule_params = iter->second->params;
if (++i == 0) {
_acl_translation = rule_params.dest.acl_translation;
_storage_class = rule_params.dest.storage_class;
_mode = rule_params.mode;
continue;
}
conflict = !(_acl_translation == rule_params.dest.acl_translation &&
_storage_class == rule_params.dest.storage_class &&
_mode == rule_params.mode);
if (conflict) {
*need_more_info = true;
return false;
}
}
Updated by J. Eric Ivancich over 2 years ago
- Target version set to v17.0.0
- Backport set to need to check
Updated by J. Eric Ivancich over 2 years ago
- Subject changed from rgw-multisite: unexecutable code, uninitialized variables to rgw-multisite: metadata conflict not computed correctly
Updated by Casey Bodley over 2 years ago
- Status changed from New to Fix Under Review
Updated by J. Eric Ivancich over 2 years ago
- Status changed from Fix Under Review to Resolved
- Backport deleted (
need to check)
Actions