[ExecutionEngine] Remove unnecessary casts (NFC) (#151442)

WA, WA1, and WA2 are already of char *.
This commit is contained in:
Kazu Hirata 2025-07-31 07:31:15 -07:00 committed by GitHub
parent e4d47832a1
commit a74948471a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,7 +81,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) {
{
// Provide working memory
char *WA1 = Mapper->prepare(Mem1->Start, HW.size() + 1);
std::strcpy(static_cast<char *>(WA1), HW.c_str());
std::strcpy(WA1, HW.c_str());
}
// A structure to be passed to initialize
@ -106,7 +106,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) {
{
char *WA2 = Mapper->prepare(Mem1->Start + PageSize, HW.size() + 1);
std::strcpy(static_cast<char *>(WA2), HW.c_str());
std::strcpy(WA2, HW.c_str());
}
MemoryMapper::AllocInfo Alloc2;
@ -159,7 +159,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) {
EXPECT_THAT_ERROR(Mem2.takeError(), Succeeded());
char *WA = Mapper->prepare(Mem2->Start, HW.size() + 1);
std::strcpy(static_cast<char *>(WA), HW.c_str());
std::strcpy(WA, HW.c_str());
MemoryMapper::AllocInfo Alloc3;
{