ref: c101a5f5c4cf01dd35af393a285f8dce704439fb
parent: 5192ce92b80a2553f70b264579714d27bb4c36f6
author: Linfeng Zhang <[email protected]>
date: Thu Mar 22 06:46:02 EDT 2018
Fix dangling-else warnings Compiler -- gcc (Debian 7.3.0-5) 7.3.0 Change-Id: If2dcc6e215a2990cde575f0e744ce0c7a44a15f1
--- a/test/byte_alignment_test.cc
+++ b/test/byte_alignment_test.cc
@@ -171,8 +171,9 @@
TEST_P(ByteAlignmentTest, TestAlignment) {
const ByteAlignmentTestParam t = GetParam();
SetByteAlignment(t.byte_alignment, t.expected_value);
- if (t.decode_remaining)
+ if (t.decode_remaining) {
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames(t.byte_alignment));
+ }
}
INSTANTIATE_TEST_CASE_P(Alignments, ByteAlignmentTest,
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -450,7 +450,9 @@
void CheckGuardBlocks() {
for (int i = 0; i < kOutputBufferSize; ++i) {
- if (IsIndexInBorder(i)) EXPECT_EQ(255, output_[i]);
+ if (IsIndexInBorder(i)) {
+ EXPECT_EQ(255, output_[i]);
+ }
}
}
--- a/test/decode_test_driver.cc
+++ b/test/decode_test_driver.cc
@@ -52,9 +52,10 @@
/* Vp8's implementation of PeekStream returns an error if the frame you
* pass it is not a keyframe, so we only expect VPX_CODEC_OK on the first
* frame, which must be a keyframe. */
- if (video->frame_number() == 0)
+ if (video->frame_number() == 0) {
ASSERT_EQ(VPX_CODEC_OK, res_peek)
<< "Peek return failed: " << vpx_codec_err_to_string(res_peek);
+ }
} else {
/* The Vp9 implementation of PeekStream returns an error only if the
* data passed to it isn't a valid Vp9 chunk. */
--- a/test/keyframe_test.cc
+++ b/test/keyframe_test.cc
@@ -68,7 +68,9 @@
// In realtime mode - auto placed keyframes are exceedingly rare, don't
// bother with this check if(GetParam() > 0)
- if (GET_PARAM(1) > 0) EXPECT_GT(kf_count_, 1);
+ if (GET_PARAM(1) > 0) {
+ EXPECT_GT(kf_count_, 1);
+ }
}
TEST_P(KeyframeTest, TestDisableKeyframes) {
@@ -128,8 +130,9 @@
// In realtime mode - auto placed keyframes are exceedingly rare, don't
// bother with this check
- if (GET_PARAM(1) > 0)
+ if (GET_PARAM(1) > 0) {
EXPECT_EQ(2u, kf_pts_list_.size()) << " Not the right number of keyframes ";
+ }
// Verify that keyframes match the file keyframes in the file.
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();