From cede3fc8052bd9bec0db71e67702c880f8f0289f Mon Sep 17 00:00:00 2001 From: Simon Martin Date: Sat, 26 May 2012 15:49:40 +0200 Subject: [PATCH] Get rid of a warning --- lib/checkuninitvar.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index b2adaf479..1b9996bf5 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -593,9 +593,9 @@ private: // parse usage.. { - std::list var; - CheckNullPointer::parseFunctionCall(tok, var, 1); - for (std::list::const_iterator it = var.begin(); it != var.end(); ++it) { + std::list var1; + CheckNullPointer::parseFunctionCall(tok, var1, 1); + for (std::list::const_iterator it = var1.begin(); it != var1.end(); ++it) { // does iterator point at first function parameter? const bool firstPar(*it == tok.tokAt(2)); @@ -617,7 +617,7 @@ private: std::list var2; CheckNullPointer::parseFunctionCall(tok, var2, 0); for (std::list::const_iterator it = var2.begin(); it != var2.end(); ++it) { - if (std::find(var.begin(), var.end(), *it) == var.end()) + if (std::find(var1.begin(), var1.end(), *it) == var1.end()) use_dead_pointer(checks, *it); } } @@ -857,9 +857,9 @@ private: else if (Token::Match(&tok, "!| %var% (")) { const Token * const ftok = (tok.str() == "!") ? tok.next() : &tok; - std::list var; - CheckNullPointer::parseFunctionCall(*ftok, var, 1); - for (std::list::const_iterator it = var.begin(); it != var.end(); ++it) { + std::list var1; + CheckNullPointer::parseFunctionCall(*ftok, var1, 1); + for (std::list::const_iterator it = var1.begin(); it != var1.end(); ++it) { // is function memset/memcpy/etc? if (ftok->str().compare(0,3,"mem") == 0) use_array_mem(checks, *it);