aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-09-01 15:33:56 +0200
committerGitHub <noreply@github.com>2023-09-01 15:33:56 +0200
commit4a8c9bb9aa872d0f20c5aeb62357f832b4f9c0b4 (patch)
tree618b84a1fc90251ddea736d6c3441fd5acd2f852 /src/libutil
parent3420b60b3995b1d26da67540950c511ccd5d5996 (diff)
parent5c95b32c461da645826ff6bf248183f066c57b20 (diff)
Merge pull request #8898 from edolstra/fix-catch-polymorphic-by-value
Fix warning 'catching polymorphic type by value'
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index f24a6e165..5a10c69e2 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -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: