mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
common,filestore: silence GCC-8 warnings
should catch polymorphic exceptions by reference. this silences warnings like: error: catching polymorphic type ‘class std::RetryException’ by value [-Werror=catch-value=] } catch (std::RetryException) { Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
19230378c8
commit
62382040ee
@ -54,7 +54,7 @@ cmd_getval(CephContext *cct, const cmdmap_t& cmdmap, const std::string& k, T& va
|
||||
try {
|
||||
val = boost::get<T>(cmdmap.find(k)->second);
|
||||
return true;
|
||||
} catch (boost::bad_get) {
|
||||
} catch (boost::bad_get&) {
|
||||
handle_bad_get(cct, k, typeid(T).name());
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ class DaemonState
|
||||
auto p = config_defaults_bl.begin();
|
||||
try {
|
||||
decode(config_defaults, p);
|
||||
} catch (buffer::error e) {
|
||||
} catch (buffer::error& e) {
|
||||
}
|
||||
}
|
||||
return config_defaults;
|
||||
|
@ -63,7 +63,7 @@
|
||||
out: \
|
||||
complete_inject_failure(); \
|
||||
return r; \
|
||||
} catch (RetryException) { \
|
||||
} catch (RetryException&) { \
|
||||
failed = true; \
|
||||
} catch (...) { \
|
||||
ceph_abort(); \
|
||||
|
Loading…
Reference in New Issue
Block a user