Fixing GCC 4.9 warnings

This commit is contained in:
Maksim Shabunin
2015-07-22 16:12:31 +03:00
parent c0b544af70
commit 14d7b38613
6 changed files with 11 additions and 27 deletions

View File

@@ -395,7 +395,7 @@ int my_jpeg_load_dht (struct jpeg_decompress_struct *info, unsigned char *dht,
bool JpegDecoder::readData( Mat& img )
{
bool result = false;
volatile bool result = false;
int step = (int)img.step;
bool color = img.channels() > 1;
@@ -557,7 +557,7 @@ bool JpegEncoder::write( const Mat& img, const std::vector<int>& params )
fileWrapper() : f(0) {}
~fileWrapper() { if(f) fclose(f); }
};
bool result = false;
volatile bool result = false;
fileWrapper fw;
int width = img.cols, height = img.rows;

View File

@@ -224,7 +224,7 @@ bool PngDecoder::readHeader()
bool PngDecoder::readData( Mat& img )
{
bool result = false;
volatile bool result = false;
AutoBuffer<uchar*> _buffer(m_height);
uchar** buffer = _buffer;
int color = img.channels() > 1;
@@ -342,10 +342,10 @@ bool PngEncoder::write( const Mat& img, const std::vector<int>& params )
{
png_structp png_ptr = png_create_write_struct( PNG_LIBPNG_VER_STRING, 0, 0, 0 );
png_infop info_ptr = 0;
FILE* f = 0;
FILE * volatile f = 0;
int y, width = img.cols, height = img.rows;
int depth = img.depth(), channels = img.channels();
bool result = false;
volatile bool result = false;
AutoBuffer<uchar*> buffer;
if( depth != CV_8U && depth != CV_16U )