From bc1616e3e45967ccec892d14a9337554238ca332 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Nov 2017 11:57:15 +0200 Subject: Get rid of GCC 7 case fall-through warnings --- odb/context.cxx | 4 ++-- odb/include.cxx | 2 +- odb/pragma.cxx | 5 ++--- odb/relational/mysql/context.cxx | 9 +++------ odb/relational/oracle/context.cxx | 4 +--- odb/relational/pgsql/context.cxx | 9 +++------ odb/relational/source.cxx | 2 +- odb/semantics/elements.cxx | 2 +- odb/validator.cxx | 2 +- 9 files changed, 15 insertions(+), 24 deletions(-) diff --git a/odb/context.cxx b/odb/context.cxx index 7801072..e959e08 100644 --- a/odb/context.cxx +++ b/odb/context.cxx @@ -213,8 +213,8 @@ translate (string const& val, const cxx_tokens& expr) } continue; // We have already gotten the next token. } - // Fall through. } + // Fall through. default: { // Handle CPP_KEYWORD here to avoid a warning (it is not @@ -487,8 +487,8 @@ translate (string const& obj, string const& val, string const& db) const } continue; // We have already gotten the next token. } - // Fall through. } + // Fall through. default: { // Handle CPP_KEYWORD here to avoid a warning (it is not diff --git a/odb/include.cxx b/odb/include.cxx index 836f202..5e9dbe0 100644 --- a/odb/include.cxx +++ b/odb/include.cxx @@ -429,8 +429,8 @@ namespace { lex.clear (); s = parse_keyword; - // Fall through. } + // Fall through. case parse_keyword: { if (is_alpha (c)) diff --git a/odb/pragma.cxx b/odb/pragma.cxx index d92039b..a88a9ec 100644 --- a/odb/pragma.cxx +++ b/odb/pragma.cxx @@ -2326,8 +2326,8 @@ handle_pragma (cxx_lexer& l, tt = l.next (tl, &tn); break; } - // Fall throught. } + // Fall through. case CPP_SCOPE: { // We have a potentially scopped enumerator name. @@ -2356,9 +2356,8 @@ handle_pragma (cxx_lexer& l, << p << endl; return; } - - // Fall through. } + // Fall through. case CPP_NUMBER: { switch (TREE_CODE (tn)) diff --git a/odb/relational/mysql/context.cxx b/odb/relational/mysql/context.cxx index 3893c16..53df6cf 100644 --- a/odb/relational/mysql/context.cxx +++ b/odb/relational/mysql/context.cxx @@ -513,10 +513,9 @@ namespace relational } } - // Fall through. - // s = parse_name; } + // Fall through. case parse_name: { if (tt == sql_token::t_identifier) @@ -719,10 +718,9 @@ namespace relational return error (ct, "expected MySQL type name"); } - // Fall through. - // s = parse_range; } + // Fall through. case parse_range: { if (t.punctuation () == sql_token::p_lparen) @@ -805,10 +803,9 @@ namespace relational continue; } - // Fall through. - // s = parse_sign; } + // Fall through. case parse_sign: { if (tt == sql_token::t_identifier && diff --git a/odb/relational/oracle/context.cxx b/odb/relational/oracle/context.cxx index 1c5b669..d6cd719 100644 --- a/odb/relational/oracle/context.cxx +++ b/odb/relational/oracle/context.cxx @@ -636,10 +636,8 @@ namespace relational return error (ct, "unexepected '" + t.literal () + "' in Oracle type declaration"); } - - // Fall through. - // } + // Fall through. case parse_prec: { if (t.punctuation () == sql_token::p_lparen) diff --git a/odb/relational/pgsql/context.cxx b/odb/relational/pgsql/context.cxx index 7f900c7..4b4b3d2 100644 --- a/odb/relational/pgsql/context.cxx +++ b/odb/relational/pgsql/context.cxx @@ -495,10 +495,9 @@ namespace relational } } - // Fall through. - // s = parse_name; } + // Fall through. case parse_name: { if (tt == sql_token::t_identifier) @@ -643,10 +642,9 @@ namespace relational : "expected PostgreSQL type name"); } - // Fall through. - // s = parse_range; } + // Fall through. case parse_range: { if (t.punctuation () == sql_token::p_lparen) @@ -691,10 +689,9 @@ namespace relational continue; } - // Fall through. - // s = parse_suffix; } + // Fall through. case parse_suffix: { if (r.type == sql_type::TIME || r.type == sql_type::TIMESTAMP) diff --git a/odb/relational/source.cxx b/odb/relational/source.cxx index acbc073..4a7dc46 100644 --- a/odb/relational/source.cxx +++ b/odb/relational/source.cxx @@ -6247,8 +6247,8 @@ namespace relational continue; // We have already gotten the next token. } } - // Fall through. } + // Fall through. default: { // Handle CPP_KEYWORD here to avoid a warning (it is not diff --git a/odb/semantics/elements.cxx b/odb/semantics/elements.cxx index a1dc668..a907dd5 100644 --- a/odb/semantics/elements.cxx +++ b/odb/semantics/elements.cxx @@ -279,8 +279,8 @@ namespace semantics case CPP_SCOPE: { new_ns = ns; // Don't change the namespace. - // Fall through. } + // Fall through. default: { r += t; diff --git a/odb/validator.cxx b/odb/validator.cxx index 0c95d0f..cd22548 100644 --- a/odb/validator.cxx +++ b/odb/validator.cxx @@ -1286,8 +1286,8 @@ namespace case ck_multimap: { kt = composite_wrapper (container_kt (m)); - // Fall through. } + // Fall through. default: { vt = composite_wrapper (container_vt (m)); -- cgit v1.1