From 33fb0e782ee64d21d22db4a73cf35a9eec5dde1f Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 21 Aug 2020 20:43:03 +0200 Subject: [PATCH] enable moduloofone reports only with --enable=style (#2747) ... because it is reported with Severity::style --- lib/checkother.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 8dcbb62c9..24f825230 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -3151,6 +3151,9 @@ void CheckOther::comparePointersError(const Token *tok, const ValueFlow::Value * void CheckOther::checkModuloOfOne() { + if (!mSettings->isEnabled(Settings::STYLE)) + return; + for (const Token *tok = mTokenizer->tokens(); tok; tok = tok->next()) { if (!tok->astOperand2() || !tok->astOperand1()) continue;