From 51afcb2f646b91a93d0a4496eb6df5e1fc02f35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 13 Jan 2019 13:22:36 +0100 Subject: [PATCH] Fix Cppcheck missingOverride warnings --- lib/checknullpointer.h | 2 +- lib/checkuninitvar.h | 2 +- lib/timer.h | 2 +- tools/reduce.cpp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/checknullpointer.h b/lib/checknullpointer.h index 74ac3bc1e..f498397f4 100644 --- a/lib/checknullpointer.h +++ b/lib/checknullpointer.h @@ -110,7 +110,7 @@ public: std::list unsafeUsage; /** Convert MyFileInfo data into xml string */ - std::string toString() const; + std::string toString() const OVERRIDE; }; /** @brief Parse current TU and extract file info */ diff --git a/lib/checkuninitvar.h b/lib/checkuninitvar.h index e41168da8..241358ff7 100644 --- a/lib/checkuninitvar.h +++ b/lib/checkuninitvar.h @@ -96,7 +96,7 @@ public: std::list unsafeUsage; /** Convert MyFileInfo data into xml string */ - std::string toString() const; + std::string toString() const OVERRIDE; }; /** @brief Parse current TU and extract file info */ diff --git a/lib/timer.h b/lib/timer.h index eaea92171..1570b05c8 100644 --- a/lib/timer.h +++ b/lib/timer.h @@ -61,7 +61,7 @@ public: } void ShowResults(SHOWTIME_MODES mode) const; - virtual void AddResults(const std::string& str, std::clock_t clocks) OVERRIDE; + void AddResults(const std::string& str, std::clock_t clocks) OVERRIDE; private: std::map mResults; diff --git a/tools/reduce.cpp b/tools/reduce.cpp index cf949b046..fbdf9b443 100644 --- a/tools/reduce.cpp +++ b/tools/reduce.cpp @@ -63,14 +63,14 @@ public: return foundLine; } - void reportOut(const std::string &/*outmsg*/) { } - void reportErr(const ErrorLogger::ErrorMessage &msg) { + void reportOut(const std::string &/*outmsg*/) override { } + void reportErr(const ErrorLogger::ErrorMessage &msg) override { if (!pattern.empty() && msg.toString(false).find(pattern) != std::string::npos) { foundLine = true; cppcheck.terminate(); } } - void reportProgress(const std::string &/*filename*/, const char /*stage*/[], const std::size_t /*value*/) { + void reportProgress(const std::string &/*filename*/, const char /*stage*/[], const std::size_t /*value*/) override { if (std::time(0) > stopTime) { if (pattern.empty()) foundLine = true;