diff options
author | Tim Landscheidt <tim@tim-landscheidt.de> | 2018-02-19 21:38:39 +0000 |
---|---|---|
committer | Tim Landscheidt <tim@tim-landscheidt.de> | 2018-02-19 21:38:39 +0000 |
commit | 4bc6db4abc83a65c822a83588189fa9db39754f1 (patch) | |
tree | 92e95336517ec47dcdc1212f954e994aa3fe8c68 | |
parent | fbccb7149eae348182bef7ac9dcba756fe72381d (diff) | |
download | fork-ledger-4bc6db4abc83a65c822a83588189fa9db39754f1.tar.gz fork-ledger-4bc6db4abc83a65c822a83588189fa9db39754f1.tar.bz2 fork-ledger-4bc6db4abc83a65c822a83588189fa9db39754f1.zip |
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 88e09329..a628c1e9 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 '|': |