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)