bool JpegDecoder::readData( Mat& img )
{
- bool result = false;
+ volatile bool result = false;
int step = (int)img.step;
bool color = img.channels() > 1;
fileWrapper() : f(0) {}
~fileWrapper() { if(f) fclose(f); }
};
- bool result = false;
+ volatile bool result = false;
fileWrapper fw;
int width = img.cols, height = img.rows;
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;
{
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 )
void run_func(void);
int validate_test_results( int test_case_idx );
double max_noise;
- float line[6], line0[6];
+ AutoBuffer<float> line, line0;
int dist_type;
double reps, aeps;
};
max_noise = 0.05;
}
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Warray-bounds"
-#endif
-
void CV_FitLineTest::generate_point_set( void* pointsSet )
{
RNG& rng = ts->get_rng();
}
}
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
-# pragma GCC diagnostic pop
-#endif
-
int CV_FitLineTest::prepare_test_case( int test_case_idx )
{
RNG& rng = ts->get_rng();
dims = cvtest::randInt(rng) % 2 + 2;
+ line.allocate(dims * 2);
+ line0.allocate(dims * 2);
min_log_size = MAX(min_log_size,5);
max_log_size = MAX(min_log_size,max_log_size);
int code = CV_BaseShapeDescrTest::prepare_test_case( test_case_idx );
cv::fitLine(cv::cvarrToMat(points), (cv::Vec6f&)line[0], dist_type, 0, reps, aeps);
}
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Warray-bounds"
-#endif
-
int CV_FitLineTest::validate_test_results( int test_case_idx )
{
int code = CV_BaseShapeDescrTest::validate_test_results( test_case_idx );
return code;
}
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
-# pragma GCC diagnostic pop
-#endif
-
/****************************************************************************************\
* ContourMoments Test *
\****************************************************************************************/