From 32c05fef926e607156fe9267c56e1b0015d0b73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 27 Nov 2018 13:04:50 +0100 Subject: [PATCH] Redundant assignment: check that --enable=style has been used. --- lib/checkother.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index a6d032a19..9cb66b8e1 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -545,6 +545,8 @@ const Token *CheckOther::checkRedundantAssignmentRecursive(const Token *assign1, void CheckOther::checkRedundantAssignment() { + if (!mSettings->isEnabled(Settings::STYLE)) + return; const SymbolDatabase* symbolDatabase = mTokenizer->getSymbolDatabase(); for (const Scope *scope : symbolDatabase->functionScopes) { if (!scope->bodyStart)