diff options
author | John Wiegley <johnw@newartisans.com> | 2019-01-14 17:25:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 17:25:28 -0800 |
commit | f2617fc69cdd4920fb6a78122b621e3db3f9ba58 (patch) | |
tree | 68ddb1e2efbb52e83f74ce9a2498e1875b6e2009 | |
parent | 5a54f079c0f511b95777013288c335d11a7552aa (diff) | |
parent | 4bc6db4abc83a65c822a83588189fa9db39754f1 (diff) | |
download | fork-ledger-f2617fc69cdd4920fb6a78122b621e3db3f9ba58.tar.gz fork-ledger-f2617fc69cdd4920fb6a78122b621e3db3f9ba58.tar.bz2 fork-ledger-f2617fc69cdd4920fb6a78122b621e3db3f9ba58.zip |
Merge pull request #540 from scfc/fix-warnings-for-implicit-fallthrough
Fix warnings for -Wimplicit-fallthrough
-rw-r--r-- | src/error.h | 2 | ||||
-rw-r--r-- | src/mask.cc | 3 | ||||
-rw-r--r-- | src/query.cc | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/error.h b/src/error.h index ba278519..bc9953cd 100644 --- a/src/error.h +++ b/src/error.h @@ -47,7 +47,7 @@ namespace ledger { extern std::ostringstream _desc_buffer; template <typename T> -inline void throw_func(const string& message) { +[[ noreturn ]] inline void throw_func(const string& message) { _desc_buffer.clear(); _desc_buffer.str(""); throw T(message); diff --git a/src/mask.cc b/src/mask.cc index 434acad6..35e690de 100644 --- a/src/mask.cc +++ b/src/mask.cc @@ -75,9 +75,8 @@ mask_t& mask_t::assign_glob(const string& pat) if (i + 1 < len) { re_pat += pat[++i]; break; - } else { - // fallthrough... } + // fallthrough... default: re_pat += pat[i]; break; diff --git a/src/query.cc b/src/query.cc index fc1d4ff0..883bea40 100644 --- a/src/query.cc +++ b/src/query.cc @@ -155,6 +155,7 @@ query_t::lexer_t::next_token(query_t::lexer_t::token_t::kind_t tok_context) case ')': if (! consume_next && tok_context == token_t::TOK_EXPR) goto test_ident; + // fall through... case '(': case '&': case '|': |