From 5dba8268e7ea0cfc2176b4e380eaa79fe6f901e9 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Mon, 4 Sep 2017 17:53:56 +0300 Subject: [PATCH] Better variable name --- lib/valueflow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index d6e88144c..246e2ca31 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -2399,16 +2399,16 @@ static void execute(const Token *expr, if (!expr->astOperand1() || expr->astOperand1()->varId() == 0U) *error = true; else { - long long i; - if (!programMemory->getIntValue(expr->astOperand1()->varId(), &i)) + long long intValue; + if (!programMemory->getIntValue(expr->astOperand1()->varId(), &intValue)) *error = true; else { - if (i == 0 && + if (intValue == 0 && expr->str() == "--" && expr->astOperand1()->variable() && expr->astOperand1()->variable()->typeStartToken()->isUnsigned()) *error = true; // overflow - *result = i + (expr->str() == "++" ? 1 : -1); + *result = intValue + (expr->str() == "++" ? 1 : -1); programMemory->setIntValue(expr->astOperand1()->varId(), *result); } }