Use delete[] to de-allocate pointers from new[]
Upstream clang has a new diagnostic, '-Wmismatched-new-delete' to generate a warning (that becomes an error with -Werror) when delete is used to deallocate pointers created with 'new[]'. This patch fixes 'delete's that trigger this warning/error. Change-Id: I7551e856b4b13bfae4cb78b5664d8652322683cf
This commit is contained in:
parent
41a0654e2a
commit
837eff22c8
1 changed files with 2 additions and 2 deletions
|
|
@ -974,8 +974,8 @@ void RunReadTest(Backtrace* backtrace, uintptr_t read_addr) {
|
|||
<< "Offset at " << i << " length " << j << " wrote too much data";
|
||||
}
|
||||
}
|
||||
delete data;
|
||||
delete expected;
|
||||
delete[] data;
|
||||
delete[] expected;
|
||||
}
|
||||
|
||||
TEST(libbacktrace, thread_read) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue