build: fix switch/enum coverage warnings

uncovered using clang's -Wswitch-enum
This commit is contained in:
Danny Robson 2016-05-12 17:45:29 +10:00
parent 420e4215ef
commit 640b4aa6ca
3 changed files with 11 additions and 10 deletions

View File

@ -40,9 +40,9 @@ operator<< (std::ostream &os, SHA1::state_t t) {
switch (t) { switch (t) {
case SHA1::READY: os << "READY"; return os; case SHA1::READY: os << "READY"; return os;
case SHA1::FINISHED: os << "FINISHED"; return os; case SHA1::FINISHED: os << "FINISHED"; return os;
default:
unreachable ();
} }
unreachable ();
} }

View File

@ -275,7 +275,9 @@ util::operator<< (std::ostream &os, util::uri::component c)
case util::uri::QUERY: return os << "QUERY"; case util::uri::QUERY: return os << "QUERY";
case util::uri::FRAGMENT: return os << "FRAGMENT"; case util::uri::FRAGMENT: return os << "FRAGMENT";
default: case util::uri::NUM_COMPONENTS:
unreachable (); unreachable ();
} }
unreachable ();
} }

View File

@ -203,10 +203,9 @@ namespace util {
case version::BETA: return os << 'b'; case version::BETA: return os << 'b';
case version::GAMMA: return os << 'g'; case version::GAMMA: return os << 'g';
case version::PRODUCTION: return os; case version::PRODUCTION: return os;
default:
unreachable ();
} }
unreachable ();
} }
} }