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: Id7b6f6c2df3e860e576de55e2f61f3d2be3a3986
VerifyFencepost(&buf_align[len]);
}
}
- delete buf;
+ delete[] buf;
}
void RunSrcDstBufferAlignTest(
VerifyFencepost(&dst_align[len]);
}
}
- delete src;
- delete dst;
+ delete[] src;
+ delete[] dst;
}
void RunCmpBufferAlignTest(
}
}
}
- delete buf1;
- delete buf2;
+ delete[] buf1;
+ delete[] buf2;
}
void RunSingleBufferOverreadTest(void (*test_func)(uint8_t*, size_t)) {
}
ASSERT_TRUE(mprotect(&memory[pagesize], pagesize, PROT_READ | PROT_WRITE) == 0);
free(memory);
- delete dst;
+ delete[] dst;
}
void RunCmpBufferOverreadTest(