1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

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
+3 -19
View File
@@ -1426,7 +1426,7 @@ protected:
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;
};
@@ -1439,11 +1439,6 @@ CV_FitLineTest::CV_FitLineTest()
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();
@@ -1515,14 +1510,12 @@ void CV_FitLineTest::generate_point_set( void* pointsSet )
}
}
#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 );
@@ -1543,11 +1536,6 @@ void CV_FitLineTest::run_func()
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 );
@@ -1626,10 +1614,6 @@ _exit_:
return code;
}
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
# pragma GCC diagnostic pop
#endif
/****************************************************************************************\
* ContourMoments Test *
\****************************************************************************************/