diff --git a/modules/datasets/CMakeLists.txt b/modules/datasets/CMakeLists.txt index b925a03d3..56ca9e310 100644 --- a/modules/datasets/CMakeLists.txt +++ b/modules/datasets/CMakeLists.txt @@ -9,4 +9,7 @@ endif() ocv_define_module(datasets opencv_core opencv_imgcodecs opencv_ml opencv_flann OPTIONAL opencv_text WRAP python) -ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # flann, Win64 +ocv_warnings_disable(CMAKE_CXX_FLAGS + /wd4267 # flann, Win64 + -Wimplicit-fallthrough # tinyxml2.cpp +) diff --git a/modules/surface_matching/src/hash_murmur64.hpp b/modules/surface_matching/src/hash_murmur64.hpp index 1cf544c1a..a8fab0802 100644 --- a/modules/surface_matching/src/hash_murmur64.hpp +++ b/modules/surface_matching/src/hash_murmur64.hpp @@ -125,16 +125,22 @@ FORCE_INLINE void hashMurmurx64 ( const void * key, const int len, const uint se { case 7: k2 ^= tail[6] << 16; + /* fallthrough */ case 6: k2 ^= tail[5] << 8; + /* fallthrough */ case 5: k2 ^= tail[4] << 0; + /* fallthrough */ case 4: k1 ^= tail[3] << 24; + /* fallthrough */ case 3: k1 ^= tail[2] << 16; + /* fallthrough */ case 2: k1 ^= tail[1] << 8; + /* fallthrough */ case 1: k1 ^= tail[0] << 0; bmix32(h1,h2,k1,k2,c1,c2); diff --git a/modules/text/src/ocr_hmm_decoder.cpp b/modules/text/src/ocr_hmm_decoder.cpp index fb4c5a1e8..598aeb31c 100644 --- a/modules/text/src/ocr_hmm_decoder.cpp +++ b/modules/text/src/ocr_hmm_decoder.cpp @@ -935,6 +935,7 @@ Ptr loadOCRHMMClassifier(const String& _filen break; case OCR_CNN_CLASSIFIER: pt = loadOCRHMMClassifierCNN(_filename); + break; default: CV_Error(Error::StsBadArg, "Specified HMM classifier is not supported!"); break; diff --git a/modules/ximgproc/src/seeds.cpp b/modules/ximgproc/src/seeds.cpp index 0cbf919ef..c851f12a6 100644 --- a/modules/ximgproc/src/seeds.cpp +++ b/modules/ximgproc/src/seeds.cpp @@ -960,16 +960,16 @@ bool SuperpixelSEEDSImpl::probability(int image_idx, int label1, int label2, switch( seeds_prior ) { case 5: p *= p; - //no break + /* fallthrough */ case 4: p *= p; - //no break + /* fallthrough */ case 3: p *= p; - //no break + /* fallthrough */ case 2: p *= p; P_label1 *= T[seeds_top_level][label2]; P_label2 *= T[seeds_top_level][label1]; - //no break + /* fallthrough */ case 1: P_label1 *= p; break;