Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d5951bc0
Commit
d5951bc0
authored
Jul 16, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: eliminate GCC8 warnings
parent
4a3dfffd
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
84 additions
and
3 deletions
+84
-3
ittnotify_config.h
3rdparty/ittnotify/src/ittnotify/ittnotify_config.h
+1
-1
CMakeLists.txt
3rdparty/openexr/CMakeLists.txt
+4
-0
CMakeLists.txt
3rdparty/protobuf/CMakeLists.txt
+3
-0
utility.cpp
apps/createsamples/utility.cpp
+4
-0
calibration.cpp
modules/calib3d/src/calibration.cpp
+7
-0
test_cameracalibration_badarg.cpp
modules/calib3d/test/test_cameracalibration_badarg.cpp
+7
-0
array.cpp
modules/core/src/array.cpp
+19
-2
contours.cpp
modules/imgproc/src/contours.cpp
+7
-0
drawing.cpp
modules/imgproc/src/drawing.cpp
+9
-0
floodfill.cpp
modules/imgproc/src/floodfill.cpp
+7
-0
test_moments.cpp
modules/imgproc/test/test_moments.cpp
+7
-0
haar.cpp
modules/objdetect/src/haar.cpp
+9
-0
No files found.
3rdparty/ittnotify/src/ittnotify/ittnotify_config.h
View file @
d5951bc0
...
@@ -335,7 +335,7 @@ ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
...
@@ -335,7 +335,7 @@ ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
#ifdef SDL_STRNCPY_S
#ifdef SDL_STRNCPY_S
#define __itt_fstrcpyn(s1, b, s2, l) SDL_STRNCPY_S(s1, b, s2, l)
#define __itt_fstrcpyn(s1, b, s2, l) SDL_STRNCPY_S(s1, b, s2, l)
#else
#else
#define __itt_fstrcpyn(s1, b, s2, l) strncpy(s1, s2,
l
)
#define __itt_fstrcpyn(s1, b, s2, l) strncpy(s1, s2,
b
)
#endif
/* SDL_STRNCPY_S */
#endif
/* SDL_STRNCPY_S */
#define __itt_fstrdup(s) strdup(s)
#define __itt_fstrdup(s) strdup(s)
...
...
3rdparty/openexr/CMakeLists.txt
View file @
d5951bc0
...
@@ -47,6 +47,10 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -W
...
@@ -47,6 +47,10 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -W
-Wsuggest-override -Winconsistent-missing-override
-Wsuggest-override -Winconsistent-missing-override
-Wimplicit-fallthrough
-Wimplicit-fallthrough
)
)
if
(
CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wclass-memaccess
)
endif
()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800
)
# vs2005
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800
)
# vs2005
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4334
)
# vs2005 Win64
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4334
)
# vs2005 Win64
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4244
)
# vs2008
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4244
)
# vs2008
...
...
3rdparty/protobuf/CMakeLists.txt
View file @
d5951bc0
...
@@ -29,6 +29,9 @@ if(CV_ICC)
...
@@ -29,6 +29,9 @@ if(CV_ICC)
-wd265 -wd858 -wd873 -wd2196
-wd265 -wd858 -wd873 -wd2196
)
)
endif
()
endif
()
if
(
CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wclass-memaccess
)
endif
()
# Easier to support different versions of protobufs
# Easier to support different versions of protobufs
function
(
append_if_exist OUTPUT_LIST
)
function
(
append_if_exist OUTPUT_LIST
)
...
...
apps/createsamples/utility.cpp
View file @
d5951bc0
...
@@ -54,6 +54,10 @@
...
@@ -54,6 +54,10 @@
#include "opencv2/highgui.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/calib3d.hpp"
#include "opencv2/calib3d.hpp"
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
using
namespace
cv
;
using
namespace
cv
;
#ifndef PATH_MAX
#ifndef PATH_MAX
...
...
modules/calib3d/src/calibration.cpp
View file @
d5951bc0
...
@@ -3159,6 +3159,10 @@ static void collectCalibrationData( InputArrayOfArrays objectPoints,
...
@@ -3159,6 +3159,10 @@ static void collectCalibrationData( InputArrayOfArrays objectPoints,
Point3f
*
objPtData
=
objPtMat
.
ptr
<
Point3f
>
();
Point3f
*
objPtData
=
objPtMat
.
ptr
<
Point3f
>
();
Point2f
*
imgPtData1
=
imgPtMat1
.
ptr
<
Point2f
>
();
Point2f
*
imgPtData1
=
imgPtMat1
.
ptr
<
Point2f
>
();
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
for
(
i
=
0
;
i
<
nimages
;
i
++
,
j
+=
ni
)
for
(
i
=
0
;
i
<
nimages
;
i
++
,
j
+=
ni
)
{
{
Mat
objpt
=
objectPoints
.
getMat
(
i
);
Mat
objpt
=
objectPoints
.
getMat
(
i
);
...
@@ -3176,6 +3180,9 @@ static void collectCalibrationData( InputArrayOfArrays objectPoints,
...
@@ -3176,6 +3180,9 @@ static void collectCalibrationData( InputArrayOfArrays objectPoints,
memcpy
(
imgPtData2
+
j
,
imgpt2
.
ptr
(),
ni
*
sizeof
(
imgPtData2
[
0
])
);
memcpy
(
imgPtData2
+
j
,
imgpt2
.
ptr
(),
ni
*
sizeof
(
imgPtData2
[
0
])
);
}
}
}
}
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
}
}
static
Mat
prepareCameraMatrix
(
Mat
&
cameraMatrix0
,
int
rtype
)
static
Mat
prepareCameraMatrix
(
Mat
&
cameraMatrix0
,
int
rtype
)
...
...
modules/calib3d/test/test_cameracalibration_badarg.cpp
View file @
d5951bc0
...
@@ -489,7 +489,14 @@ protected:
...
@@ -489,7 +489,14 @@ protected:
void
run
(
int
/* start_from */
)
void
run
(
int
/* start_from */
)
{
{
CvMat
zeros
;
CvMat
zeros
;
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
memset
(
&
zeros
,
0
,
sizeof
(
zeros
));
memset
(
&
zeros
,
0
,
sizeof
(
zeros
));
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
C_Caller
caller
,
bad_caller
;
C_Caller
caller
,
bad_caller
;
CvMat
objectPoints_c
,
r_vec_c
,
t_vec_c
,
A_c
,
distCoeffs_c
,
imagePoints_c
,
CvMat
objectPoints_c
,
r_vec_c
,
t_vec_c
,
A_c
,
distCoeffs_c
,
imagePoints_c
,
...
...
modules/core/src/array.cpp
View file @
d5951bc0
...
@@ -2916,12 +2916,29 @@ cvInitImageHeader( IplImage * image, CvSize size, int depth,
...
@@ -2916,12 +2916,29 @@ cvInitImageHeader( IplImage * image, CvSize size, int depth,
if
(
!
image
)
if
(
!
image
)
CV_Error
(
CV_HeaderIsNull
,
"null pointer to header"
);
CV_Error
(
CV_HeaderIsNull
,
"null pointer to header"
);
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
memset
(
image
,
0
,
sizeof
(
*
image
));
memset
(
image
,
0
,
sizeof
(
*
image
));
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
image
->
nSize
=
sizeof
(
*
image
);
image
->
nSize
=
sizeof
(
*
image
);
icvGetColorModel
(
channels
,
&
colorModel
,
&
channelSeq
);
icvGetColorModel
(
channels
,
&
colorModel
,
&
channelSeq
);
strncpy
(
image
->
colorModel
,
colorModel
,
4
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
strncpy
(
image
->
channelSeq
,
channelSeq
,
4
);
{
image
->
colorModel
[
i
]
=
colorModel
[
i
];
if
(
colorModel
[
i
]
==
0
)
break
;
}
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
image
->
channelSeq
[
i
]
=
channelSeq
[
i
];
if
(
channelSeq
[
i
]
==
0
)
break
;
}
if
(
size
.
width
<
0
||
size
.
height
<
0
)
if
(
size
.
width
<
0
||
size
.
height
<
0
)
CV_Error
(
CV_BadROISize
,
"Bad input roi"
);
CV_Error
(
CV_BadROISize
,
"Bad input roi"
);
...
...
modules/imgproc/src/contours.cpp
View file @
d5951bc0
...
@@ -209,7 +209,14 @@ cvStartFindContours_Impl( void* _img, CvMemStorage* storage,
...
@@ -209,7 +209,14 @@ cvStartFindContours_Impl( void* _img, CvMemStorage* storage,
CV_Error
(
CV_StsBadSize
,
""
);
CV_Error
(
CV_StsBadSize
,
""
);
CvContourScanner
scanner
=
(
CvContourScanner
)
cvAlloc
(
sizeof
(
*
scanner
));
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
)
);
memset
(
scanner
,
0
,
sizeof
(
*
scanner
)
);
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
scanner
->
storage1
=
scanner
->
storage2
=
storage
;
scanner
->
storage1
=
scanner
->
storage2
=
storage
;
scanner
->
img0
=
(
schar
*
)
img
;
scanner
->
img0
=
(
schar
*
)
img
;
...
...
modules/imgproc/src/drawing.cpp
View file @
d5951bc0
...
@@ -2564,6 +2564,11 @@ static const int CodeDeltas[8][2] =
...
@@ -2564,6 +2564,11 @@ static const int CodeDeltas[8][2] =
#define CV_ADJUST_EDGE_COUNT( count, seq ) \
#define CV_ADJUST_EDGE_COUNT( count, seq ) \
((count) -= ((count) == (seq)->total && !CV_IS_SEQ_CLOSED(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
CV_IMPL
void
cvDrawContours
(
void
*
_img
,
CvSeq
*
contour
,
cvDrawContours
(
void
*
_img
,
CvSeq
*
contour
,
CvScalar
_externalColor
,
CvScalar
_holeColor
,
CvScalar
_externalColor
,
CvScalar
_holeColor
,
...
@@ -2895,4 +2900,8 @@ cvGetTextSize( const char *text, const CvFont *_font, CvSize *_size, int *_base_
...
@@ -2895,4 +2900,8 @@ cvGetTextSize( const char *text, const CvFont *_font, CvSize *_size, int *_base_
*
_size
=
size
;
*
_size
=
size
;
}
}
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop // "-Wclass-memaccess"
#endif
/* End of file. */
/* End of file. */
modules/imgproc/src/floodfill.cpp
View file @
d5951bc0
...
@@ -642,8 +642,15 @@ cvFloodFill( CvArr* arr, CvPoint seed_point,
...
@@ -642,8 +642,15 @@ cvFloodFill( CvArr* arr, CvPoint seed_point,
CvScalar
newVal
,
CvScalar
lo_diff
,
CvScalar
up_diff
,
CvScalar
newVal
,
CvScalar
lo_diff
,
CvScalar
up_diff
,
CvConnectedComp
*
comp
,
int
flags
,
CvArr
*
maskarr
)
CvConnectedComp
*
comp
,
int
flags
,
CvArr
*
maskarr
)
{
{
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
if
(
comp
)
if
(
comp
)
memset
(
comp
,
0
,
sizeof
(
*
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
);
cv
::
Mat
img
=
cv
::
cvarrToMat
(
arr
),
mask
=
cv
::
cvarrToMat
(
maskarr
);
int
area
=
cv
::
floodFill
(
img
,
mask
,
seed_point
,
newVal
,
int
area
=
cv
::
floodFill
(
img
,
mask
,
seed_point
,
newVal
,
...
...
modules/imgproc/test/test_moments.cpp
View file @
d5951bc0
...
@@ -186,7 +186,14 @@ void CV_MomentsTest::prepare_to_validation( int /*test_case_idx*/ )
...
@@ -186,7 +186,14 @@ void CV_MomentsTest::prepare_to_validation( int /*test_case_idx*/ )
int
i
,
y
,
x
,
cols
=
src
.
cols
;
int
i
,
y
,
x
,
cols
=
src
.
cols
;
double
xc
=
0.
,
yc
=
0.
;
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
));
memset
(
&
m
,
0
,
sizeof
(
m
));
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
int
coi
=
0
;
int
coi
=
0
;
for
(
y
=
0
;
y
<
src
.
rows
;
y
++
)
for
(
y
=
0
;
y
<
src
.
rows
;
y
++
)
...
...
modules/objdetect/src/haar.cpp
View file @
d5951bc0
...
@@ -67,6 +67,11 @@
...
@@ -67,6 +67,11 @@
# endif
# endif
#endif
#endif
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
/* these settings affect the quality of detection: change with care */
/* these settings affect the quality of detection: change with care */
#define CV_ADJUST_FEATURES 1
#define CV_ADJUST_FEATURES 1
#define CV_ADJUST_WEIGHTS 0
#define CV_ADJUST_WEIGHTS 0
...
@@ -2290,4 +2295,8 @@ CvType haar_type( CV_TYPE_NAME_HAAR, icvIsHaarClassifier,
...
@@ -2290,4 +2295,8 @@ CvType haar_type( CV_TYPE_NAME_HAAR, icvIsHaarClassifier,
icvReadHaarClassifier
,
icvWriteHaarClassifier
,
icvReadHaarClassifier
,
icvWriteHaarClassifier
,
icvCloneHaarClassifier
);
icvCloneHaarClassifier
);
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
/* End of file. */
/* End of file. */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment