From 02a3a01ecab8e4d7e33141a52d70aec4e989438e Mon Sep 17 00:00:00 2001 From: Alexander Mai Date: Sun, 28 Jun 2015 18:07:31 +0200 Subject: [PATCH] Fix compiler warnings --- lib/checkbufferoverrun.cpp | 2 ++ lib/checkunusedfunctions.cpp | 2 +- lib/checkunusedfunctions.h | 2 +- lib/checkunusedvar.cpp | 1 + lib/executionpath.h | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 52a5cd2c0..cdc297bca 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1417,6 +1417,8 @@ MathLib::biguint CheckBufferOverrun::countSprintfLength(const std::string &input case 'X': case 'i': i_d_x_f_found = true; + handleNextParameter = true; + break; case 'c': case 'e': case 'E': diff --git a/lib/checkunusedfunctions.cpp b/lib/checkunusedfunctions.cpp index 6122730e1..4033a0af4 100644 --- a/lib/checkunusedfunctions.cpp +++ b/lib/checkunusedfunctions.cpp @@ -265,7 +265,7 @@ Check::FileInfo *CheckUnusedFunctions::getFileInfo(const Tokenizer *tokenizer, c } -void CheckUnusedFunctions::analyseWholeProgram(const std::list &fileInfo, ErrorLogger &errorLogger) +void CheckUnusedFunctions::analyseWholeProgram(const std::list &fileInfo, const Settings& settings, ErrorLogger &errorLogger) { (void)fileInfo; check(&errorLogger); diff --git a/lib/checkunusedfunctions.h b/lib/checkunusedfunctions.h index c28aeb57c..7ad791399 100644 --- a/lib/checkunusedfunctions.h +++ b/lib/checkunusedfunctions.h @@ -51,7 +51,7 @@ public: Check::FileInfo *getFileInfo(const Tokenizer *tokenizer, const Settings *settings) const; /** @brief Analyse all file infos for all TU */ - void analyseWholeProgram(const std::list &fileInfo, ErrorLogger &errorLogger); + void analyseWholeProgram(const std::list &fileInfo, const Settings& settings, ErrorLogger &errorLogger); static CheckUnusedFunctions instance; diff --git a/lib/checkunusedvar.cpp b/lib/checkunusedvar.cpp index 7f4745a2e..93fcde6de 100644 --- a/lib/checkunusedvar.cpp +++ b/lib/checkunusedvar.cpp @@ -94,6 +94,7 @@ public: private: /** No implementation */ + ScopeGuard(); ScopeGuard& operator=(const ScopeGuard &); Variables & _guarded; diff --git a/lib/executionpath.h b/lib/executionpath.h index 226263b08..f35dbce44 100644 --- a/lib/executionpath.h +++ b/lib/executionpath.h @@ -35,6 +35,7 @@ class SymbolDatabase; class CPPCHECKLIB ExecutionPath { private: /** No implementation */ + ExecutionPath(); ExecutionPath& operator=(const ExecutionPath &); protected: