Commit 2ddeeac5 authored by Alexander Alekhin's avatar Alexander Alekhin

eliminate build warnings / fix bug in text module

parent c818de99
......@@ -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
)
......@@ -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);
......
......@@ -935,6 +935,7 @@ Ptr<OCRHMMDecoder::ClassifierCallback> 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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment