summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_swift_auth.cc
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2021-11-05 21:02:17 +0100
committerCasey Bodley <cbodley@redhat.com>2021-11-05 21:17:28 +0100
commit578b43e8d5cc22a47bcb3efd0168544f03cb801c (patch)
tree4ea5b5a2ad702fdb8b04dd6cec7027af609c98f4 /src/rgw/rgw_swift_auth.cc
parentMerge PR #43786 into master (diff)
downloadceph-578b43e8d5cc22a47bcb3efd0168544f03cb801c.tar.xz
ceph-578b43e8d5cc22a47bcb3efd0168544f03cb801c.zip
rgw/auth: perm_mask uses std::optional
resolves a compiler warning about an uninitialized variable in boost::optional: In file included from ../src/rgw/rgw_common.h:1508, from ../src/rgw/rgw_main.cc:18: ../src/rgw/rgw_auth.h: In member function ‘virtual rgw::auth::swift::DefaultStrategy::aplptr_t rgw::auth::swift::DefaultStrategy::_ZThn56_NK3rgw4auth5swift15D efaultStrategy15create_apl_turlEPN4ceph6common11CephContextEPK9req_stateRK11RGWUserInfo(ceph::common::CephContext*, const req_state*, const RGWUserInfo&) cons t’: ../src/rgw/rgw_auth.h:652:38: warning: ‘<unnamed>.boost::optional<unsigned int>::<unnamed>.boost::optional_detail::tc_optional_base<unsigned int>::m_storage’ may be used uninitialized [-Wmaybe-uninitialized] 652 | this->perm_mask = perm_mask.get(); | ~~~~~~~~~~~~~^~ In file included from ../src/rgw/rgw_rest_swift.h:14, from ../src/rgw/rgw_main.cc:24: ../src/rgw/rgw_swift_auth.h:27:73: note: ‘<anonymous>’ declared here 27 | : LocalApplier(cct, user_info, LocalApplier::NO_SUBUSER, boost::none) { | Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_swift_auth.cc')
-rw-r--r--src/rgw/rgw_swift_auth.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc
index 3791e7d9214..c34ee221edf 100644
--- a/src/rgw/rgw_swift_auth.cc
+++ b/src/rgw/rgw_swift_auth.cc
@@ -461,7 +461,7 @@ ExternalTokenEngine::authenticate(const DoutPrefixProvider* dpp,
auto apl = apl_factory->create_apl_local(cct, s, user->get_info(),
extract_swift_subuser(swift_user),
- boost::none);
+ std::nullopt);
return result_t::grant(std::move(apl));
}
@@ -615,7 +615,7 @@ SignedTokenEngine::authenticate(const DoutPrefixProvider* dpp,
auto apl = apl_factory->create_apl_local(cct, s, user->get_info(),
extract_swift_subuser(swift_user),
- boost::none);
+ std::nullopt);
return result_t::grant(std::move(apl));
}