summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-02 22:57:31 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-06-04 01:57:56 +0000
commit76834c02c4d1349ecb42e2e0ae3f22c4aa1612a4 (patch)
tree407e8947edf5897d9f6799b4375943a4431623de
parenta9227776e05cd21f362b365eee73ab9c7b9f4bd6 (diff)
downloadqttools-76834c02c4d1349ecb42e2e0ae3f22c4aa1612a4.tar.gz
Fix GCC 7 warnings about unmarked case statement fallthroughs
doc.cpp:632:39: error: this statement may fall through [-Werror=implicit-fallthrough=] Change-Id: Ia3e896da908f42939148fffd14c48709a6772552 Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r--src/qdoc/cppcodeparser.cpp2
-rw-r--r--src/qdoc/doc.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp
index b67520600..a819026d8 100644
--- a/src/qdoc/cppcodeparser.cpp
+++ b/src/qdoc/cppcodeparser.cpp
@@ -1431,8 +1431,8 @@ bool CppCodeParser::matchFunctionDecl(Aggregate *parent,
matched_static = true;
break;
case Tok_QT_DEPRECATED:
- // no break here.
matched_QT_DEPRECATED = true;
+ Q_FALLTHROUGH(); // no break here.
case Tok_QT_COMPAT:
matched_compat = true;
break;
diff --git a/src/qdoc/doc.cpp b/src/qdoc/doc.cpp
index 031b7729a..4124ee1e4 100644
--- a/src/qdoc/doc.cpp
+++ b/src/qdoc/doc.cpp
@@ -630,6 +630,7 @@ void DocParser::parse(const QString& source,
break;
case CMD_BOLD:
location().warning(tr("'\\bold' is deprecated. Use '\\b'"));
+ Q_FALLTHROUGH();
case CMD_B:
startFormat(ATOM_FORMATTING_BOLD, cmd);
break;
@@ -883,6 +884,7 @@ void DocParser::parse(const QString& source,
break;
case CMD_I:
location().warning(tr("'\\i' is deprecated. Use '\\e' for italic or '\\li' for list item"));
+ Q_FALLTHROUGH();
case CMD_E:
startFormat(ATOM_FORMATTING_ITALIC, cmd);
break;
@@ -1030,6 +1032,7 @@ void DocParser::parse(const QString& source,
break;
case CMD_O:
location().warning(tr("'\\o' is deprecated. Use '\\li'"));
+ Q_FALLTHROUGH();
case CMD_LI:
leavePara();
if (openedCommands.top() == CMD_LIST) {
@@ -1492,7 +1495,7 @@ void DocParser::parse(const QString& source,
getRestOfLine();
break;
}
- // fall through
+ Q_FALLTHROUGH(); // fall through
}
default:
{