From 43035ff186540213a7c666d3aaea489caf0db6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 13 Jan 2019 08:42:48 +0100 Subject: [PATCH] Remove inline suppression. The Cppcheck warning was a true positive. --- lib/checkclass.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index ef6b6ce6b..1548e7067 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -2413,10 +2413,9 @@ void CheckClass::pureVirtualFunctionCallInConstructorError( for (const Token *tok : tokStack) errorPath.emplace_back(tok, "Calling " + tok->str()); if (!errorPath.empty()) - // cppcheck-suppress unreadVariable // FP errorPath.back().second = purefuncname + " is a pure virtual method without body"; - reportError(tokStack, Severity::warning, "pureVirtualCall", + reportError(errorPath, Severity::warning, "pureVirtualCall", "$symbol:" + purefuncname +"\n" "Call of pure virtual function '$symbol' in " + scopeFunctionTypeName + ".\n" "Call of pure virtual function '$symbol' in " + scopeFunctionTypeName + ". The call will fail during runtime.", CWE(0U), false);