Skip to content

Commit d9e364f

Browse files
committed
Merge pull request opencv#9606 from sovrasov:fix_gcc7_warnings
2 parents 597b3f4 + 32bf712 commit d9e364f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

cmake/OpenCVCompilerOptions.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
138138
add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
139139
add_extra_compiler_option(-Wno-unnamed-type-template-args)
140140
add_extra_compiler_option(-Wno-comment)
141+
add_extra_compiler_option(-Wno-implicit-fallthrough)
141142
endif()
142143
add_extra_compiler_option(-fdiagnostics-show-option)
143144

modules/core/test/test_math.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,7 +2883,9 @@ TEST(Core_KMeans, compactness)
28832883
}
28842884
EXPECT_NEAR(expected, compactness, expected * 1e-8);
28852885
if (K == N)
2886+
{
28862887
EXPECT_DOUBLE_EQ(compactness, 0.0);
2888+
}
28872889
}
28882890
}
28892891

@@ -3441,7 +3443,9 @@ TEST(Core_SoftFloat, pow32)
34413443
softfloat x32(x.f);
34423444
ASSERT_TRUE(pow(zero, -x32).isInf());
34433445
if(x32 != one)
3446+
{
34443447
ASSERT_EQ(pow(zero, x32), zero);
3448+
}
34453449
}
34463450
}
34473451

@@ -3577,7 +3581,9 @@ TEST(Core_SoftFloat, pow64)
35773581

35783582
ASSERT_TRUE(pow(zero, -x64).isInf());
35793583
if(x64 != one)
3584+
{
35803585
ASSERT_EQ(pow(zero, x64), zero);
3586+
}
35813587
}
35823588
}
35833589

modules/videoio/test/test_video_io.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ class Videoio_Bunny : public Videoio_Test_Base, public testing::TestWithParam<st
178178
if (ext != "mpg")
179179
{
180180
if (count_prop > 0)
181+
{
181182
EXPECT_EQ(count_gt, count_prop);
183+
}
182184
}
183185

184186
int count_actual = 0;
@@ -193,7 +195,9 @@ class Videoio_Bunny : public Videoio_Test_Base, public testing::TestWithParam<st
193195
count_actual += 1;
194196
}
195197
if (count_prop > 0)
198+
{
196199
EXPECT_NEAR(count_gt, count_actual, 1);
200+
}
197201
else
198202
std::cout << "Frames counter is not available. Actual frames: " << count_actual << ". SKIP check." << std::endl;
199203
}

0 commit comments

Comments
 (0)