Skip to content

Commit 7eb1065

Browse files
committed
Fixed/disabled warnings produced by GCC 7
1 parent cc2ee92 commit 7eb1065

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

cmake/OpenCVCompilerOptions.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
128128
add_extra_compiler_option(-Wno-unnamed-type-template-args)
129129
add_extra_compiler_option(-Wno-comment)
130130
add_extra_compiler_option(-Wno-implicit-fallthrough)
131+
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.2.0)
132+
add_extra_compiler_option(-Wno-strict-overflow) # Issue is fixed in GCC 7.2.1
133+
endif()
131134
endif()
132135
add_extra_compiler_option(-fdiagnostics-show-option)
133136

modules/imgcodecs/src/grfmt_gdal.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ bool GdalDecoder::readData( Mat& img ){
426426
for( int y=0; y<nRows; y++ ){
427427

428428
// get the entire row
429-
band->RasterIO( GF_Read, 0, y, nCols, 1, scanline, nCols, 1, GDT_Float64, 0, 0);
429+
CPLErr err = band->RasterIO( GF_Read, 0, y, nCols, 1, scanline, nCols, 1, GDT_Float64, 0, 0);
430+
CV_Assert(err == CE_None);
430431

431432
// set inside the image
432433
for( int x=0; x<nCols; x++ ){

modules/videoio/src/cap_openni2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ bool CvCapture_OpenNI2::setDepthGeneratorProperty( int propIdx, double propValue
609609
if ( streams[CV_COLOR_STREAM].isValid() )
610610
{
611611
openni::ImageRegistrationMode mode = propValue != 0.0 ? openni::IMAGE_REGISTRATION_DEPTH_TO_COLOR : openni::IMAGE_REGISTRATION_OFF;
612-
if( !device.getImageRegistrationMode() == mode )
612+
if( device.getImageRegistrationMode() != mode )
613613
{
614614
if (device.isImageRegistrationModeSupported(mode))
615615
{

0 commit comments

Comments
 (0)