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).
{
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;
}
if( mode == CV_RETR_FLOODFILL )
{
prev = ((int*)img)[x - 1];
- new_mask = INT_MIN >> 1;
+ new_mask = INT_MIN / 2;
}
for( ; y < height; y++, img += step )
xyD[r] = 0;
for (int k = 0; k < ksize; ++k)
xyD[r] += w[k] * xyS[k * cn + r];
- xyD[r] = xyD[r];
}
}
}