Merge branch 'master' of git@github.com:danmar/cppcheck

This commit is contained in:
Reijo Tomperi 2010-04-18 22:13:52 +03:00
commit 83dbdc55b5
1 changed files with 7 additions and 0 deletions

View File

@ -1015,6 +1015,13 @@ private:
" data[-1] = 0;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:4]: (error) Array index -1 corresponds with 4294967295, which is likely out of bounds\n", errout.str());
check("void f()\n"
"{\n"
" char data[8][4];\n"
" data[5][-1] = 0;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:4]: (error) Array index -1 corresponds with 4294967295, which is likely out of bounds\n", errout.str());
}
void array_index_for_decr()