1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

More issues found by static analysis

This commit is contained in:
Maksim Shabunin
2018-07-24 14:14:13 +03:00
parent 8de08e0463
commit cbb1e867e5
27 changed files with 51 additions and 81 deletions
+2 -5
View File
@@ -265,7 +265,7 @@ bool BmpDecoder::readData( Mat& img )
for(;;)
{
int code = m_strm.getWord();
int len = code & 255;
const int len = code & 255;
code >>= 8;
if( len != 0 ) // encoded mode
{
@@ -304,16 +304,13 @@ bool BmpDecoder::readData( Mat& img )
else
{
int x_shift3 = (int)(line_end - data);
int y_shift = m_height - y;
if( code == 2 )
{
x_shift3 = m_strm.getByte()*nch;
y_shift = m_strm.getByte();
m_strm.getByte();
}
len = x_shift3 + ((y_shift * width3) & ((code == 0) - 1));
if( color )
data = FillUniColor( data, line_end, step, width3,
y, m_height, x_shift3,