diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp index 084250aeaa3..3cef91f8727 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -68,11 +68,13 @@ #include #endif +#if defined(_WIN32) #if defined(_MSC_VER) #define USE_WINDOWS_SEH +#endif +#include #include #include -#include #include #endif diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 21909689bd7..7d4982ae830 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -32,8 +32,6 @@ #include #include #include -#include -#include #ifdef __SVR4 // Solaris #include @@ -48,8 +46,8 @@ #include #endif #ifdef THREADING_MODEL_WIN -#include -#include +#include +#include #endif // required for FD_ZERO diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index 91dbc7299d1..2fc9d3fd036 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -33,8 +33,6 @@ #define THREADING_MODEL_FORK #elif defined(_WIN32) #define THREADING_MODEL_WIN -#include - #include "importproject.h" #endif diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 5cac88e1a91..3e29e6fc08c 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -2263,7 +2263,7 @@ bool Tokenizer::simplifyUsing() Token::Match(tok, "using namespace %name% ;|::")) { try { setScopeInfo(tok, ¤tScope, mSettings->debugwarnings); - } catch (const std::runtime_error &e) { + } catch (const std::runtime_error &) { reportError(tok, Severity::debug, "simplifyUsingUnmatchedBodyEnd", "simplifyUsing: unmatched body end"); } @@ -2417,7 +2417,7 @@ bool Tokenizer::simplifyUsing() Token::Match(tok1, "using namespace %name% ;|::")) { try { setScopeInfo(tok1, ¤tScope1, mSettings->debugwarnings); - } catch (const std::runtime_error &e) { + } catch (const std::runtime_error &) { reportError(tok1, Severity::debug, "simplifyUsingUnmatchedBodyEnd", "simplifyUsing: unmatched body end"); }