]> granicus.if.org Git - libvpx/commitdiff
Fix dangling-else warnings
authorLinfeng Zhang <linfengz@google.com>
Thu, 22 Mar 2018 17:46:02 +0000 (10:46 -0700)
committerLinfeng Zhang <linfengz@google.com>
Thu, 22 Mar 2018 18:44:01 +0000 (11:44 -0700)
Compiler -- gcc (Debian 7.3.0-5) 7.3.0

Change-Id: If2dcc6e215a2990cde575f0e744ce0c7a44a15f1

test/byte_alignment_test.cc
test/convolve_test.cc
test/decode_test_driver.cc
test/keyframe_test.cc

index 5a058b27561e6f022755c18a447045abc5fb1f0f..0ef6c4c5192f26d2d8058fe7b1794074b9b00ba9 100644 (file)
@@ -171,8 +171,9 @@ TEST_F(ByteAlignmentTest, SwitchByteAlignment) {
 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,
index 70f0b11a77058ca34f9657883ef0a49522305409..3f0367110a93d825ffb7dbe801c10ec6cccc9661 100644 (file)
@@ -450,7 +450,9 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
 
   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]);
+      }
     }
   }
 
index 48680eb8e97510ecb52544dc3838bc7fb1592ef8..f6224820a7d9c887eefb6399c53773ac8c0b608f 100644 (file)
@@ -52,9 +52,10 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder,
     /* 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. */
index ee75f401ca5d7bf603afd70c11959587785f163d..2dab0cb4904c9a31ce8bdcbe0bb99620718992d6 100644 (file)
@@ -68,7 +68,9 @@ TEST_P(KeyframeTest, TestRandomVideoSource) {
 
   // 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 @@ TEST_P(KeyframeTest, TestAutoKeyframe) {
 
   // 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();