Cleanup: unnecessary includes, fix include order, fix unreferenced va… (#3418)

This commit is contained in:
chrchr-github 2021-08-26 19:36:31 +02:00 committed by GitHub
parent f31fbba54a
commit d9b6940070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 9 deletions

View File

@ -68,11 +68,13 @@
#include <execinfo.h>
#endif
#if defined(_WIN32)
#if defined(_MSC_VER)
#define USE_WINDOWS_SEH
#endif
#include <Windows.h>
#include <DbgHelp.h>
#include <TCHAR.H>
#include <Windows.h>
#include <excpt.h>
#endif

View File

@ -32,8 +32,6 @@
#include <cstring>
#include <iostream>
#include <utility>
#include <future>
#include <numeric>
#ifdef __SVR4 // Solaris
#include <sys/loadavg.h>
@ -48,8 +46,8 @@
#include <unistd.h>
#endif
#ifdef THREADING_MODEL_WIN
#include <process.h>
#include <windows.h>
#include <future>
#include <numeric>
#endif
// required for FD_ZERO

View File

@ -33,8 +33,6 @@
#define THREADING_MODEL_FORK
#elif defined(_WIN32)
#define THREADING_MODEL_WIN
#include <windows.h>
#include "importproject.h"
#endif

View File

@ -2263,7 +2263,7 @@ bool Tokenizer::simplifyUsing()
Token::Match(tok, "using namespace %name% ;|::")) {
try {
setScopeInfo(tok, &currentScope, 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, &currentScope1, mSettings->debugwarnings);
} catch (const std::runtime_error &e) {
} catch (const std::runtime_error &) {
reportError(tok1, Severity::debug, "simplifyUsingUnmatchedBodyEnd",
"simplifyUsing: unmatched body end");
}