From: Maksim Shabunin Date: Mon, 9 Oct 2017 10:52:07 +0000 (+0300) Subject: Fixed and suppressed warnings produced by GCC 6.3.0 X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~534^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef332dc550650a8fb4a1111a1c8fed8f823278e3;p=platform%2Fupstream%2Fopencv.git Fixed and suppressed warnings produced by GCC 6.3.0 --- diff --git a/3rdparty/libjpeg/CMakeLists.txt b/3rdparty/libjpeg/CMakeLists.txt index 969cd99..b323255 100644 --- a/3rdparty/libjpeg/CMakeLists.txt +++ b/3rdparty/libjpeg/CMakeLists.txt @@ -38,7 +38,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set_source_files_properties(jcdctmgr.c PROPERTIES COMPILE_FLAGS "-O1") endif() -ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align -Wshadow -Wunused) +ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align -Wshadow -Wunused -Wshift-negative-value) ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 /wd4244 /wd4267) # vs2005 diff --git a/modules/videoio/src/cap_dc1394_v2.cpp b/modules/videoio/src/cap_dc1394_v2.cpp index b3fc18c..0d674fe 100644 --- a/modules/videoio/src/cap_dc1394_v2.cpp +++ b/modules/videoio/src/cap_dc1394_v2.cpp @@ -603,9 +603,9 @@ bool CvCaptureCAM_DC1394_v2_CPP::grabFrame() cvInitImageHeader(&fhdr, cvSize(fc->size[0], fc->size[1]), 8, nch); cvSetData(&fhdr, fc->image, fc->size[0]*nch); - // Swap R&B channels: - if (nch==3) - cvConvertImage(&fhdr,&fhdr,CV_CVTIMG_SWAP_RB); + // Swap R&B channels: + if (nch==3) + cvConvertImage(&fhdr,&fhdr,CV_CVTIMG_SWAP_RB); if( rectify && cameraId == VIDERE && nimages == 2 ) {