ctld: Catch exceptions by reference instead of by value
Reported by: GCC -Wcatch-value Sponsored by: Chelsio Communications
This commit is contained in:
@@ -466,7 +466,7 @@ parse_conf(const char *path)
|
||||
bool parsed;
|
||||
try {
|
||||
parsed = yyparse_conf(fp.get());
|
||||
} catch (std::bad_alloc) {
|
||||
} catch (std::bad_alloc &) {
|
||||
log_warnx("failed to allocate memory parsing %s", path);
|
||||
return (false);
|
||||
} catch (...) {
|
||||
|
||||
@@ -1418,7 +1418,7 @@ uclparse_conf(const char *path)
|
||||
bool parsed;
|
||||
try {
|
||||
parsed = uclparse_toplevel(top);
|
||||
} catch (std::bad_alloc) {
|
||||
} catch (std::bad_alloc &) {
|
||||
log_warnx("failed to allocate memory parsing %s", path);
|
||||
parsed = false;
|
||||
} catch (...) {
|
||||
|
||||
Reference in New Issue
Block a user