1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #14162 from alalek:eliminate_coverity_scan_issues

core: eliminate coverity scan issues (#14162)

* core(hal): avoid using of r,g,b,a parameters in interleave/deinterleave

- static analysis tools blame on possible parameters reordering
- align AVX parameters with corresponding SSE/NEO/VSX/cpp code

* core: avoid "i,j" parameters in Matx methods

- static analysis tools blame on possible parameters reordering

* core: resolve coverity scan issues
This commit is contained in:
Alexander Alekhin
2019-03-27 15:48:00 +03:00
committed by GitHub
parent 5368a4ac41
commit d6b82dcd65
4 changed files with 99 additions and 89 deletions
+10
View File
@@ -918,7 +918,13 @@ int cv::borderInterpolate( int p, int len, int borderType )
{
CV_TRACE_FUNCTION_VERBOSE();
CV_DbgAssert(len > 0);
#ifdef CV_STATIC_ANALYSIS
if(p >= 0 && p < len)
#else
if( (unsigned)p < (unsigned)len )
#endif
;
else if( borderType == BORDER_REPLICATE )
p = p < 0 ? 0 : len - 1;
@@ -934,7 +940,11 @@ int cv::borderInterpolate( int p, int len, int borderType )
else
p = len - 1 - (p - len) - delta;
}
#ifdef CV_STATIC_ANALYSIS
while(p < 0 || p >= len);
#else
while( (unsigned)p >= (unsigned)len );
#endif
}
else if( borderType == BORDER_WRAP )
{