mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
backport fixes for static analyzer warnings
Commits: -09837928d9-10fb88d027Excluded changes with std::atomic (C++98 requirement)
This commit is contained in:
@@ -179,7 +179,7 @@ bool Jpeg2KDecoder::readData( Mat& img )
|
||||
{
|
||||
Ptr<Jpeg2KDecoder> close_this(this, Jpeg2KDecoder_close);
|
||||
bool result = false;
|
||||
int color = img.channels() > 1;
|
||||
bool color = img.channels() > 1;
|
||||
uchar* data = img.ptr();
|
||||
size_t step = img.step;
|
||||
jas_stream_t* stream = (jas_stream_t*)m_stream;
|
||||
|
||||
@@ -226,7 +226,7 @@ bool PngDecoder::readData( Mat& img )
|
||||
volatile bool result = false;
|
||||
AutoBuffer<uchar*> _buffer(m_height);
|
||||
uchar** buffer = _buffer.data();
|
||||
int color = img.channels() > 1;
|
||||
bool color = img.channels() > 1;
|
||||
|
||||
png_structp png_ptr = (png_structp)m_png_ptr;
|
||||
png_infop info_ptr = (png_infop)m_info_ptr;
|
||||
|
||||
@@ -208,7 +208,7 @@ bool PxMDecoder::readHeader()
|
||||
|
||||
bool PxMDecoder::readData( Mat& img )
|
||||
{
|
||||
int color = img.channels() > 1;
|
||||
bool color = img.channels() > 1;
|
||||
uchar* data = img.ptr();
|
||||
PaletteEntry palette[256];
|
||||
bool result = false;
|
||||
@@ -225,7 +225,7 @@ bool PxMDecoder::readData( Mat& img )
|
||||
// create LUT for converting colors
|
||||
if( bit_depth == 8 )
|
||||
{
|
||||
CV_Assert(m_maxval < 256);
|
||||
CV_Assert(m_maxval < 256 && m_maxval > 0);
|
||||
|
||||
for (int i = 0; i <= m_maxval; i++)
|
||||
gray_palette[i] = (uchar)((i*255/m_maxval)^(m_bpp == 1 ? 255 : 0));
|
||||
|
||||
@@ -160,7 +160,7 @@ bool SunRasterDecoder::readHeader()
|
||||
|
||||
bool SunRasterDecoder::readData( Mat& img )
|
||||
{
|
||||
int color = img.channels() > 1;
|
||||
bool color = img.channels() > 1;
|
||||
uchar* data = img.ptr();
|
||||
size_t step = img.step;
|
||||
uchar gray_palette[256] = {0};
|
||||
|
||||
Reference in New Issue
Block a user