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

Merge pull request #11986 from alalek:build_eliminate_gcc8_warnings

This commit is contained in:
Alexander Alekhin
2018-07-17 15:41:36 +00:00
12 changed files with 84 additions and 3 deletions
+7
View File
@@ -209,7 +209,14 @@ cvStartFindContours_Impl( void* _img, CvMemStorage* storage,
CV_Error( CV_StsBadSize, "" );
CvContourScanner scanner = (CvContourScanner)cvAlloc( sizeof( *scanner ));
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
memset( scanner, 0, sizeof(*scanner) );
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
scanner->storage1 = scanner->storage2 = storage;
scanner->img0 = (schar *) img;
+9
View File
@@ -2564,6 +2564,11 @@ static const int CodeDeltas[8][2] =
#define CV_ADJUST_EDGE_COUNT( count, seq ) \
((count) -= ((count) == (seq)->total && !CV_IS_SEQ_CLOSED(seq)))
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
CV_IMPL void
cvDrawContours( void* _img, CvSeq* contour,
CvScalar _externalColor, CvScalar _holeColor,
@@ -2895,4 +2900,8 @@ cvGetTextSize( const char *text, const CvFont *_font, CvSize *_size, int *_base_
*_size = size;
}
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop // "-Wclass-memaccess"
#endif
/* End of file. */
+7
View File
@@ -642,8 +642,15 @@ cvFloodFill( CvArr* arr, CvPoint seed_point,
CvScalar newVal, CvScalar lo_diff, CvScalar up_diff,
CvConnectedComp* comp, int flags, CvArr* maskarr )
{
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
if( comp )
memset( comp, 0, sizeof(*comp) );
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
cv::Mat img = cv::cvarrToMat(arr), mask = cv::cvarrToMat(maskarr);
int area = cv::floodFill(img, mask, seed_point, newVal,
+7
View File
@@ -186,7 +186,14 @@ void CV_MomentsTest::prepare_to_validation( int /*test_case_idx*/ )
int i, y, x, cols = src.cols;
double xc = 0., yc = 0.;
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
memset( &m, 0, sizeof(m));
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
int coi = 0;
for( y = 0; y < src.rows; y++ )