mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Fixing some static analysis issues
This commit is contained in:
@@ -96,6 +96,7 @@ ImageDecoder BaseImageDecoder::newDecoder() const
|
||||
|
||||
BaseImageEncoder::BaseImageEncoder()
|
||||
{
|
||||
m_buf = 0;
|
||||
m_buf_supported = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,9 @@ BmpDecoder::BmpDecoder()
|
||||
m_signature = fmtSignBmp;
|
||||
m_offset = -1;
|
||||
m_buf_supported = true;
|
||||
m_origin = 0;
|
||||
m_bpp = 0;
|
||||
m_rle_code = BMP_RGB;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +194,7 @@ bool BmpDecoder::readData( Mat& img )
|
||||
uchar* data = img.ptr();
|
||||
int step = (int)img.step;
|
||||
bool color = img.channels() > 1;
|
||||
uchar gray_palette[256];
|
||||
uchar gray_palette[256] = {0};
|
||||
bool result = false;
|
||||
int src_pitch = ((m_width*(m_bpp != 15 ? m_bpp : 16) + 7)/8 + 3) & -4;
|
||||
int nch = color ? 3 : 1;
|
||||
|
||||
@@ -81,6 +81,13 @@ ExrDecoder::ExrDecoder()
|
||||
m_signature = "\x76\x2f\x31\x01";
|
||||
m_file = 0;
|
||||
m_red = m_green = m_blue = 0;
|
||||
m_type = ((Imf::PixelType)0);
|
||||
m_iscolor = false;
|
||||
m_bit_depth = 0;
|
||||
m_isfloat = false;
|
||||
m_ischroma = false;
|
||||
m_native_depth = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ int my_jpeg_load_dht (struct jpeg_decompress_struct *info, unsigned char *dht,
|
||||
|
||||
JHUFF_TBL **hufftbl;
|
||||
unsigned char bits[17];
|
||||
unsigned char huffval[256];
|
||||
unsigned char huffval[256] = {0};
|
||||
|
||||
while (length > 16)
|
||||
{
|
||||
|
||||
@@ -324,6 +324,9 @@ PAMDecoder::PAMDecoder()
|
||||
m_buf_supported = true;
|
||||
bit_mode = false;
|
||||
selected_fmt = CV_IMWRITE_PAM_FORMAT_NULL;
|
||||
m_maxval = 0;
|
||||
m_channels = 0;
|
||||
m_sampledepth = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ PngDecoder::PngDecoder()
|
||||
m_f = 0;
|
||||
m_buf_supported = true;
|
||||
m_buf_pos = 0;
|
||||
m_bit_depth = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -94,6 +94,9 @@ PxMDecoder::PxMDecoder()
|
||||
{
|
||||
m_offset = -1;
|
||||
m_buf_supported = true;
|
||||
m_bpp = 0;
|
||||
m_binary = false;
|
||||
m_maxval = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,10 @@ SunRasterDecoder::SunRasterDecoder()
|
||||
{
|
||||
m_offset = -1;
|
||||
m_signature = fmtSignSunRas;
|
||||
m_bpp = 0;
|
||||
m_encoding = RAS_STANDARD;
|
||||
m_maptype = RMT_NONE;
|
||||
m_maplength = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +161,7 @@ bool SunRasterDecoder::readData( Mat& img )
|
||||
int color = img.channels() > 1;
|
||||
uchar* data = img.ptr();
|
||||
int step = (int)img.step;
|
||||
uchar gray_palette[256];
|
||||
uchar gray_palette[256] = {0};
|
||||
bool result = false;
|
||||
int src_pitch = ((m_width*m_bpp + 7)/8 + 1) & -2;
|
||||
int nch = color ? 3 : 1;
|
||||
|
||||
@@ -62,6 +62,7 @@ namespace cv
|
||||
WebPDecoder::WebPDecoder()
|
||||
{
|
||||
m_buf_supported = true;
|
||||
channels = 0;
|
||||
}
|
||||
|
||||
WebPDecoder::~WebPDecoder() {}
|
||||
|
||||
Reference in New Issue
Block a user