diff --git a/lib/checkautovariables.cpp b/lib/checkautovariables.cpp index 1f683b2bb..1e29ede5d 100644 --- a/lib/checkautovariables.cpp +++ b/lib/checkautovariables.cpp @@ -22,9 +22,7 @@ #include "checkautovariables.h" #include "symboldatabase.h" -#include "checkuninitvar.h" -#include #include //--------------------------------------------------------------------------- diff --git a/lib/checkautovariables.h b/lib/checkautovariables.h index db47805ef..087d992a9 100644 --- a/lib/checkautovariables.h +++ b/lib/checkautovariables.h @@ -24,7 +24,6 @@ #include "config.h" #include "check.h" -#include "token.h" /// @addtogroup Checks /** @brief Various small checks for automatic variables */ diff --git a/lib/checkbool.h b/lib/checkbool.h index 036b22068..c773a5445 100644 --- a/lib/checkbool.h +++ b/lib/checkbool.h @@ -24,9 +24,7 @@ #include "config.h" #include "check.h" -#include "settings.h" -class Token; class Function; class Variable; diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 6358ea46c..60137f036 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -23,7 +23,6 @@ #include "checkbufferoverrun.h" #include "tokenize.h" -#include "errorlogger.h" #include "mathlib.h" #include "symboldatabase.h" diff --git a/lib/checkbufferoverrun.h b/lib/checkbufferoverrun.h index 259632e92..03153fb88 100644 --- a/lib/checkbufferoverrun.h +++ b/lib/checkbufferoverrun.h @@ -24,15 +24,11 @@ #include "config.h" #include "check.h" -#include "settings.h" #include "mathlib.h" #include #include #include -class ErrorLogger; -class Token; -class Tokenizer; class Variable; /// @addtogroup Checks diff --git a/lib/checkclass.h b/lib/checkclass.h index 78f6e4117..a2ac1ef60 100644 --- a/lib/checkclass.h +++ b/lib/checkclass.h @@ -24,7 +24,6 @@ #include "config.h" #include "check.h" -class Token; class Scope; class Function; diff --git a/lib/checkexceptionsafety.cpp b/lib/checkexceptionsafety.cpp index 4a71fd1c4..c0dedfb26 100644 --- a/lib/checkexceptionsafety.cpp +++ b/lib/checkexceptionsafety.cpp @@ -19,7 +19,6 @@ //--------------------------------------------------------------------------- #include "checkexceptionsafety.h" #include "symboldatabase.h" -#include "token.h" //--------------------------------------------------------------------------- diff --git a/lib/checkexceptionsafety.h b/lib/checkexceptionsafety.h index c42029f52..947f18dfe 100644 --- a/lib/checkexceptionsafety.h +++ b/lib/checkexceptionsafety.h @@ -23,9 +23,6 @@ #include "config.h" #include "check.h" -#include "settings.h" - -class Token; /// @addtogroup Checks /// @{ diff --git a/lib/checkinternal.h b/lib/checkinternal.h index 5caa71f7c..1bcba76d0 100644 --- a/lib/checkinternal.h +++ b/lib/checkinternal.h @@ -25,8 +25,6 @@ #include "check.h" #include "config.h" -class Token; - /// @addtogroup Checks /// @{ diff --git a/lib/checkio.cpp b/lib/checkio.cpp index de5ae6039..47376a8c0 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -20,8 +20,6 @@ #include "checkio.h" #include "tokenize.h" -#include "token.h" -#include "errorlogger.h" #include "symboldatabase.h" #include diff --git a/lib/checkio.h b/lib/checkio.h index e3718749d..4739a82a9 100644 --- a/lib/checkio.h +++ b/lib/checkio.h @@ -23,7 +23,6 @@ #include "check.h" #include "config.h" -#include "symboldatabase.h" /// @addtogroup Checks /// @{ diff --git a/lib/checkleakautovar.cpp b/lib/checkleakautovar.cpp index 394c98397..5b3574f9d 100644 --- a/lib/checkleakautovar.cpp +++ b/lib/checkleakautovar.cpp @@ -26,11 +26,8 @@ #include "checkother.h" // <- doubleFreeError #include "tokenize.h" -#include "errorlogger.h" #include "symboldatabase.h" -#include - //--------------------------------------------------------------------------- const int DEALLOC = -1; diff --git a/lib/checkleakautovar.h b/lib/checkleakautovar.h index ad59200ae..4b6714a64 100644 --- a/lib/checkleakautovar.h +++ b/lib/checkleakautovar.h @@ -25,6 +25,9 @@ #include "config.h" #include "check.h" +#include +#include + class CPPCHECKLIB VarInfo { public: diff --git a/lib/checkmemoryleak.h b/lib/checkmemoryleak.h index 41e3f74d7..4de0527f9 100644 --- a/lib/checkmemoryleak.h +++ b/lib/checkmemoryleak.h @@ -38,7 +38,6 @@ #include #include -class Token; class Scope; class Function; class Variable; diff --git a/lib/checknullpointer.h b/lib/checknullpointer.h index 16c8c4ee2..a6f0015fd 100644 --- a/lib/checknullpointer.h +++ b/lib/checknullpointer.h @@ -24,10 +24,7 @@ #include "config.h" #include "check.h" -#include "settings.h" -class Token; -class SymbolDatabase; /// @addtogroup Checks /// @{ diff --git a/lib/checkother.cpp b/lib/checkother.cpp index ed511838b..4e2ee3674 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -21,7 +21,6 @@ #include "checkother.h" #include "mathlib.h" #include "symboldatabase.h" -#include "templatesimplifier.h" #include // fabs() #include diff --git a/lib/checkother.h b/lib/checkother.h index d55853ad0..34b554132 100644 --- a/lib/checkother.h +++ b/lib/checkother.h @@ -24,9 +24,7 @@ #include "config.h" #include "check.h" -#include "settings.h" -class Token; class Function; class Variable; diff --git a/lib/checksizeof.cpp b/lib/checksizeof.cpp index 9b74fb1f9..b65b63f24 100644 --- a/lib/checksizeof.cpp +++ b/lib/checksizeof.cpp @@ -309,7 +309,7 @@ void CheckSizeof::sizeofVoid() if (isMember) { // Get 'struct.member' complete name (without spaces) varname = tok2->stringifyList(tok->next()); - varname.erase(remove_if(varname.begin(), varname.end(), + varname.erase(std::remove_if(varname.begin(), varname.end(), static_cast(std::isspace)), varname.end()); } } diff --git a/lib/checksizeof.h b/lib/checksizeof.h index 65d572ccb..d82eaa202 100644 --- a/lib/checksizeof.h +++ b/lib/checksizeof.h @@ -24,9 +24,7 @@ #include "config.h" #include "check.h" -#include "settings.h" -class Token; class Function; class Variable; diff --git a/lib/checkstl.h b/lib/checkstl.h index a1b86e2df..29668715a 100644 --- a/lib/checkstl.h +++ b/lib/checkstl.h @@ -25,7 +25,6 @@ #include "config.h" #include "check.h" -class Token; /// @addtogroup Checks /// @{ diff --git a/lib/checkuninitvar.h b/lib/checkuninitvar.h index 449dd0d47..b461b4486 100644 --- a/lib/checkuninitvar.h +++ b/lib/checkuninitvar.h @@ -24,9 +24,7 @@ #include "config.h" #include "check.h" -#include "settings.h" -class Token; class Scope; class Variable; diff --git a/lib/checkunusedfunctions.h b/lib/checkunusedfunctions.h index 009238186..9f1c10e80 100644 --- a/lib/checkunusedfunctions.h +++ b/lib/checkunusedfunctions.h @@ -24,8 +24,6 @@ #include "config.h" #include "check.h" -#include "tokenize.h" -#include "errorlogger.h" /// @addtogroup Checks /** @brief Check for functions never called */ diff --git a/lib/checkunusedvar.h b/lib/checkunusedvar.h index 64d4b4ba7..30fb1abb3 100644 --- a/lib/checkunusedvar.h +++ b/lib/checkunusedvar.h @@ -21,14 +21,12 @@ #define checkunusedvarH //--------------------------------------------------------------------------- -#include - #include "config.h" #include "check.h" -#include "settings.h" + +#include class Type; -class Token; class Scope; class Variables;