diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index a51c5adf1..c9eaa8e8e 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -971,17 +971,6 @@ void CheckBufferOverrun::checkScope(const Token *tok, const std::vector 0 && Token::Match(tok, "%varid% [ %num% ]", declarationId)) || - (declarationId == 0 && Token::Match(tok, (varnames + " [ %num% ]").c_str()))) { - const MathLib::bigint index = MathLib::toLongNumber(tok->strAt(2 + varc)); - if (index >= size) { - std::vector indexes; - indexes.push_back(index); - arrayIndexOutOfBoundsError(tok->tokAt(varc), arrayInfo, indexes); - } - } - // If the result of pointer arithmetic means that the pointer is // out of bounds then this flag will be set. bool pointerIsOutOfBounds = false;