diff options
author | Angie Chiang <angiebird@google.com> | 2018-11-20 15:43:04 -0800 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2018-11-21 10:40:40 -0800 |
commit | a2a0cce56c1ef5bc1c0a02620533d3be24f54c84 (patch) | |
tree | fe08cd1cbc24e302426411d3c6e40ce465014cf8 /test | |
parent | 59e4e673033d86dc815fa4f44058d8e903d340d4 (diff) | |
download | libvpx-a2a0cce56c1ef5bc1c0a02620533d3be24f54c84.tar libvpx-a2a0cce56c1ef5bc1c0a02620533d3be24f54c84.tar.gz libvpx-a2a0cce56c1ef5bc1c0a02620533d3be24f54c84.tar.bz2 libvpx-a2a0cce56c1ef5bc1c0a02620533d3be24f54c84.zip |
Fix scan_build warnings in variance_test.cc
BUG=webm:1575
Change-Id: I62602aa47f07d525ba95fe7b2618bf62ae23fe6f
Diffstat (limited to 'test')
-rw-r--r-- | test/variance_test.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/variance_test.cc b/test/variance_test.cc index fce7a1475..e9fa03c68 100644 --- a/test/variance_test.cc +++ b/test/variance_test.cc @@ -561,15 +561,16 @@ class SubpelVarianceTest if (!use_high_bit_depth()) { src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size())); sec_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size())); - ref_ = new uint8_t[block_size() + width() + height() + 1]; + ref_ = reinterpret_cast<uint8_t *>( + vpx_malloc(block_size() + width() + height() + 1)); #if CONFIG_VP9_HIGHBITDEPTH } else { src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>( vpx_memalign(16, block_size() * sizeof(uint16_t)))); sec_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>( vpx_memalign(16, block_size() * sizeof(uint16_t)))); - ref_ = CONVERT_TO_BYTEPTR( - new uint16_t[block_size() + width() + height() + 1]); + ref_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(vpx_malloc( + (block_size() + width() + height() + 1) * sizeof(uint16_t)))); #endif // CONFIG_VP9_HIGHBITDEPTH } ASSERT_TRUE(src_ != NULL); @@ -580,12 +581,12 @@ class SubpelVarianceTest virtual void TearDown() { if (!use_high_bit_depth()) { vpx_free(src_); - delete[] ref_; vpx_free(sec_); + vpx_free(ref_); #if CONFIG_VP9_HIGHBITDEPTH } else { vpx_free(CONVERT_TO_SHORTPTR(src_)); - delete[] CONVERT_TO_SHORTPTR(ref_); + vpx_free(CONVERT_TO_SHORTPTR(ref_)); vpx_free(CONVERT_TO_SHORTPTR(sec_)); #endif // CONFIG_VP9_HIGHBITDEPTH } |