mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 14:02:42 +01:00
Merge pull request #8157 from hercules-ci/switch-bugs
Fix current and future `switch` bugs
This commit is contained in:
commit
523c3f7225
12 changed files with 42 additions and 11 deletions
|
|
@ -65,9 +65,10 @@ public:
|
|||
switch (lvl) {
|
||||
case lvlError: c = '3'; break;
|
||||
case lvlWarn: c = '4'; break;
|
||||
case lvlInfo: c = '5'; break;
|
||||
case lvlNotice: case lvlInfo: c = '5'; break;
|
||||
case lvlTalkative: case lvlChatty: c = '6'; break;
|
||||
default: c = '7';
|
||||
case lvlDebug: case lvlVomit: c = '7';
|
||||
default: c = '7'; break; // should not happen, and missing enum case is reported by -Werror=switch-enum
|
||||
}
|
||||
prefix = std::string("<") + c + ">";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue