Fixed several problems found by PVS-Studio.

This fixes all problems from the article "Checking OpenCV with PVS-Studio"
<http://www.viva64.com/en/b/0191/> that are not already fixed and are
not in 3rdparty or the legacy module.

The problems fixed are two instances of useless code and one instance
of unspecified behavior (right-shifting a negative number).
This commit is contained in:
Roman Donchenko
2014-05-20 13:54:00 +04:00
parent 976da2f3d3
commit 7ea1bf3cf0
3 changed files with 2 additions and 3 deletions

View File

@@ -1353,7 +1353,7 @@ void Core_DetTest::get_test_array_types_and_sizes( int test_case_idx, vector<vec
{
Base::get_test_array_types_and_sizes( test_case_idx, sizes, types );
sizes[INPUT][0].width = sizes[INPUT][0].height = sizes[INPUT][0].height;
sizes[INPUT][0].width = sizes[INPUT][0].height;
sizes[TEMP][0] = sizes[INPUT][0];
types[TEMP][0] = CV_64FC1;
}