From e0f24601258528b214026a27c91fce913b329654 Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Mon, 19 Nov 2018 14:27:53 -0800 Subject: [PATCH] Fix scan_build warnings in dct_test.cc BUG=webm:1575 Change-Id: I277c159bafa2ef7c3cfa27c86f60e3df0c3b79b3 --- test/dct_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/dct_test.cc b/test/dct_test.cc index e7883c141..5b5ce4001 100644 --- a/test/dct_test.cc +++ b/test/dct_test.cc @@ -210,6 +210,7 @@ class TransTestBase : public ::testing::TestWithParam { Buffer test_input_block = Buffer(size_, size_, 8, size_ == 4 ? 0 : 16); ASSERT_TRUE(test_input_block.Init()); + ASSERT_TRUE(test_input_block.TopLeftPixel() != NULL); Buffer test_temp_block = Buffer(size_, size_, 0, 16); ASSERT_TRUE(test_temp_block.Init()); @@ -314,6 +315,7 @@ class TransTestBase : public ::testing::TestWithParam { } else if (i == 1) { input_extreme_block.Set(-max_pixel_value_); } else { + ASSERT_TRUE(input_extreme_block.TopLeftPixel() != NULL); for (int h = 0; h < size_; ++h) { for (int w = 0; w < size_; ++w) { input_extreme_block @@ -328,6 +330,7 @@ class TransTestBase : public ::testing::TestWithParam { // The minimum quant value is 4. EXPECT_TRUE(output_block.CheckValues(output_ref_block)); + ASSERT_TRUE(output_block.TopLeftPixel() != NULL); for (int h = 0; h < size_; ++h) { for (int w = 0; w < size_; ++w) { EXPECT_GE( @@ -365,6 +368,7 @@ class TransTestBase : public ::testing::TestWithParam { for (int i = 0; i < count_test_block; ++i) { InitMem(); + ASSERT_TRUE(in.TopLeftPixel() != NULL); // Initialize a test block with input range [-max_pixel_value_, // max_pixel_value_]. for (int h = 0; h < size_; ++h) { -- 2.40.0