Skip to content

Commit 206959c

Browse files
committed
Merge pull request #1644 from alalek:build_warnings
2 parents c818de9 + 2ddeeac commit 206959c

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

modules/datasets/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ endif()
99

1010
ocv_define_module(datasets opencv_core opencv_imgcodecs opencv_ml opencv_flann OPTIONAL opencv_text WRAP python)
1111

12-
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # flann, Win64
12+
ocv_warnings_disable(CMAKE_CXX_FLAGS
13+
/wd4267 # flann, Win64
14+
-Wimplicit-fallthrough # tinyxml2.cpp
15+
)

modules/surface_matching/src/hash_murmur64.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,22 @@ FORCE_INLINE void hashMurmurx64 ( const void * key, const int len, const uint se
125125
{
126126
case 7:
127127
k2 ^= tail[6] << 16;
128+
/* fallthrough */
128129
case 6:
129130
k2 ^= tail[5] << 8;
131+
/* fallthrough */
130132
case 5:
131133
k2 ^= tail[4] << 0;
134+
/* fallthrough */
132135
case 4:
133136
k1 ^= tail[3] << 24;
137+
/* fallthrough */
134138
case 3:
135139
k1 ^= tail[2] << 16;
140+
/* fallthrough */
136141
case 2:
137142
k1 ^= tail[1] << 8;
143+
/* fallthrough */
138144
case 1:
139145
k1 ^= tail[0] << 0;
140146
bmix32(h1,h2,k1,k2,c1,c2);

modules/text/src/ocr_hmm_decoder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,7 @@ Ptr<OCRHMMDecoder::ClassifierCallback> loadOCRHMMClassifier(const String& _filen
935935
break;
936936
case OCR_CNN_CLASSIFIER:
937937
pt = loadOCRHMMClassifierCNN(_filename);
938+
break;
938939
default:
939940
CV_Error(Error::StsBadArg, "Specified HMM classifier is not supported!");
940941
break;

modules/ximgproc/src/seeds.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -960,16 +960,16 @@ bool SuperpixelSEEDSImpl::probability(int image_idx, int label1, int label2,
960960
switch( seeds_prior )
961961
{
962962
case 5: p *= p;
963-
//no break
963+
/* fallthrough */
964964
case 4: p *= p;
965-
//no break
965+
/* fallthrough */
966966
case 3: p *= p;
967-
//no break
967+
/* fallthrough */
968968
case 2:
969969
p *= p;
970970
P_label1 *= T[seeds_top_level][label2];
971971
P_label2 *= T[seeds_top_level][label1];
972-
//no break
972+
/* fallthrough */
973973
case 1:
974974
P_label1 *= p;
975975
break;

0 commit comments

Comments
 (0)