forked from lix-project/lix
Merge pull request #8898 from edolstra/fix-catch-polymorphic-by-value
Fix warning 'catching polymorphic type by value'
This commit is contained in:
commit
4a8c9bb9aa
|
@ -96,7 +96,7 @@ void CreateDerivationAndRealiseGoal::getDerivation()
|
|||
auto drvPath = StorePath::dummy;
|
||||
try {
|
||||
drvPath = resolveDerivedPath(worker.store, *drvReq);
|
||||
} catch (MissingRealisation) {
|
||||
} catch (MissingRealisation &) {
|
||||
return std::nullopt;
|
||||
}
|
||||
return worker.evalStore.isValidPath(drvPath) || worker.store.isValidPath(drvPath)
|
||||
|
|
|
@ -60,7 +60,7 @@ void initLibUtil() {
|
|||
bool caught = false;
|
||||
try {
|
||||
throwExceptionSelfCheck();
|
||||
} catch (nix::Error _e) {
|
||||
} catch (const nix::Error & _e) {
|
||||
caught = true;
|
||||
}
|
||||
// This is not actually the main point of this check, but let's make sure anyway:
|
||||
|
|
Loading…
Reference in a new issue