From: Adam C. Emerson Date: Tue, 8 May 2018 23:53:19 +0000 (-0400) Subject: rgw: Catch exceptions at const references X-Git-Tag: v13.2.0~37^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d5b154f42876cb1946ca5f87d215ec02bc72bc56;p=ceph.git rgw: Catch exceptions at const references /Never/ by value. Signed-off-by: Adam C. Emerson (cherry picked from commit 25f6b639495ef9047480a286945793af50621bf6) --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index d472490a1c3f..c95ccf861cf8 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -4310,7 +4310,7 @@ int RGWDeleteObj::handle_slo_manifest(bufferlist& bl) try { deleter = std::unique_ptr(\ new RGWBulkDelete::Deleter(store, s)); - } catch (std::bad_alloc) { + } catch (const std::bad_alloc&) { return -ENOMEM; } diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 4e9b082eaae2..d73b6d51d963 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -399,7 +399,7 @@ ExternalTokenEngine::authenticate(const std::string& token, } else { swift_user = std::move(swift_groups[0]); } - } catch (std::out_of_range) { + } catch (const std::out_of_range&) { /* The X-Auth-Groups header isn't present in the response. */ return result_t::deny(-EPERM); }