From 07b337c580ec3a09c9c7891d029e49055892927a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 1 Oct 2019 17:33:58 +0200 Subject: [PATCH] Removed extra zero division heuristics, they seem redundant as ValueType is used --- lib/checkother.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index d880d0249..7170e01b1 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1611,14 +1611,6 @@ void CheckOther::checkZeroDivision() continue; if (!tok->valueType() || !tok->valueType()->isIntegral()) continue; - if (tok->astOperand1()->isNumber()) { - if (MathLib::isFloat(tok->astOperand1()->str())) - continue; - } else if (tok->astOperand1()->isName()) { - if (!tok->astOperand1()->valueType()->isIntegral()) - continue; - } else if (!tok->astOperand1()->isArithmeticalOp()) - continue; // Value flow.. const ValueFlow::Value *value = tok->astOperand2()->getValue(0LL);