From 10f3a2e5f213df4a1d50947066613bf87a5a1008 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 31 May 2016 13:23:54 +0200 Subject: Fix clang build failure Apparently opinion is divided on whether [[noreturn]] is allowed on a lambda: http://stackoverflow.com/questions/26888805/how-to-declare-a-lambdas-operator-as-noreturn http://hydra.nixos.org/build/36462100 --- src/libstore/nar-info.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc index c0c5cecd1730..4ff4c996dabd 100644 --- a/src/libstore/nar-info.cc +++ b/src/libstore/nar-info.cc @@ -5,7 +5,7 @@ namespace nix { NarInfo::NarInfo(const std::string & s, const std::string & whence) { - auto corrupt = [&]() [[noreturn]] { + auto corrupt = [&]() { throw Error("NAR info file ‘%1%’ is corrupt"); }; @@ -14,6 +14,7 @@ NarInfo::NarInfo(const std::string & s, const std::string & whence) return parseHash(s); } catch (BadHash &) { corrupt(); + return Hash(); // never reached } }; -- cgit 1.4.1