]> granicus.if.org Git - libvpx/commitdiff
Fix scan_build warnings in dct_test.cc
authorAngie Chiang <angiebird@google.com>
Mon, 19 Nov 2018 22:27:53 +0000 (14:27 -0800)
committerAngie Chiang <angiebird@google.com>
Tue, 20 Nov 2018 22:55:43 +0000 (14:55 -0800)
BUG=webm:1575

Change-Id: I277c159bafa2ef7c3cfa27c86f60e3df0c3b79b3

test/dct_test.cc

index e7883c1410987030e1fc6b4e9dcc53fc7f0bade5..5b5ce4001a04ce238904680152c57a0dd9afb164 100644 (file)
@@ -210,6 +210,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
     Buffer<int16_t> test_input_block =
         Buffer<int16_t>(size_, size_, 8, size_ == 4 ? 0 : 16);
     ASSERT_TRUE(test_input_block.Init());
+    ASSERT_TRUE(test_input_block.TopLeftPixel() != NULL);
     Buffer<tran_low_t> test_temp_block =
         Buffer<tran_low_t>(size_, size_, 0, 16);
     ASSERT_TRUE(test_temp_block.Init());
@@ -314,6 +315,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
       } 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<DctParam> {
 
       // 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<DctParam> {
 
     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) {