mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
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
This commit is contained in:
parent
759ac27f28
commit
10f3a2e5f2
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue