diff options
author | Christian Kandeler <[email protected]> | 2017-07-14 13:44:33 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2017-07-17 07:51:23 +0000 |
commit | be2b3c91ae4ddb97c35237da11b350c99cc6fd3b (patch) | |
tree | 30e177b9f5a019b639966a13834c2d7fd2196594 /src/plugins/ios/iostoolhandler.cpp | |
parent | c9301e80bb960ba5df93fdd22932257542693154 (diff) |
Add Q_FALLTHROUGH for Qt < 5.8
... and make use of it.
With gcc 7, the new option -Wimplicit-fallthrough is introduced and
added to the -Wextra set, triggering dozens of warnings in our sources.
Therefore, we annotate all obviously intended fall-throughs. The ones
that are still left are unclear and need to be checked by the respective
maintainer.
Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc
Reviewed-by: Nikita Baryshnikov <[email protected]>
Reviewed-by: hjk <[email protected]>
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/ios/iostoolhandler.cpp')
-rw-r--r-- | src/plugins/ios/iostoolhandler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index f2afa714337..317c1f6f594 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -33,6 +33,7 @@ #include <coreplugin/icore.h> #include <utils/qtcassert.h> #include <utils/fileutils.h> +#include <utils/qtcfallthrough.h> #include "utils/runextensions.h" #include "utils/synchronousprocess.h" @@ -606,7 +607,7 @@ void IosDeviceToolHandlerPrivate::subprocessHasData() switch (state) { case NonStarted: qCWarning(toolHandlerLog) << "IosToolHandler unexpected state in subprocessHasData: NonStarted"; - // pass + Q_FALLTHROUGH(); case Starting: case StartedInferior: // read some data @@ -771,7 +772,7 @@ void IosDeviceToolHandlerPrivate::stop(int errorCode) switch (oldState) { case NonStarted: qCWarning(toolHandlerLog) << "IosToolHandler::stop() when state was NonStarted"; - // pass + Q_FALLTHROUGH(); case Starting: switch (op){ case OpNone: @@ -786,7 +787,7 @@ void IosDeviceToolHandlerPrivate::stop(int errorCode) case OpDeviceInfo: break; } - // pass + Q_FALLTHROUGH(); case StartedInferior: case XmlEndProcessed: toolExited(errorCode); |