diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake index ed8cf3c98e..defabb07ce 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake @@ -138,6 +138,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) add_extra_compiler_option(-Wno-delete-non-virtual-dtor) add_extra_compiler_option(-Wno-unnamed-type-template-args) add_extra_compiler_option(-Wno-comment) + add_extra_compiler_option(-Wno-implicit-fallthrough) endif() add_extra_compiler_option(-fdiagnostics-show-option) diff --git a/modules/core/test/test_math.cpp b/modules/core/test/test_math.cpp index a54425cf55..ed960dcf98 100644 --- a/modules/core/test/test_math.cpp +++ b/modules/core/test/test_math.cpp @@ -2883,7 +2883,9 @@ TEST(Core_KMeans, compactness) } EXPECT_NEAR(expected, compactness, expected * 1e-8); if (K == N) + { EXPECT_DOUBLE_EQ(compactness, 0.0); + } } } @@ -3441,7 +3443,9 @@ TEST(Core_SoftFloat, pow32) softfloat x32(x.f); ASSERT_TRUE(pow(zero, -x32).isInf()); if(x32 != one) + { ASSERT_EQ(pow(zero, x32), zero); + } } } @@ -3577,7 +3581,9 @@ TEST(Core_SoftFloat, pow64) ASSERT_TRUE(pow(zero, -x64).isInf()); if(x64 != one) + { ASSERT_EQ(pow(zero, x64), zero); + } } } diff --git a/modules/videoio/test/test_video_io.cpp b/modules/videoio/test/test_video_io.cpp index d2eae6f869..c1abca087a 100644 --- a/modules/videoio/test/test_video_io.cpp +++ b/modules/videoio/test/test_video_io.cpp @@ -178,7 +178,9 @@ public: if (ext != "mpg") { if (count_prop > 0) + { EXPECT_EQ(count_gt, count_prop); + } } int count_actual = 0; @@ -193,7 +195,9 @@ public: count_actual += 1; } if (count_prop > 0) + { EXPECT_NEAR(count_gt, count_actual, 1); + } else std::cout << "Frames counter is not available. Actual frames: " << count_actual << ". SKIP check." << std::endl; }