test-cache: fix build errors with GCC 12

error: ‘void operator delete(void*, Genode::Deallocator&)’ called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]

Issue #4827
Fixes #4848
This commit is contained in:
Christian Helmuth 2023-05-09 14:03:32 +02:00
parent e4ac393de4
commit d0578700bc

View File

@ -50,8 +50,10 @@ Main::Main(Genode::Env &env) : env(env)
enum { MAX_KB = 4*1024 };
char * buf1 = new (heap) char[MAX_KB*1024];
char * buf2 = new (heap) char[MAX_KB*1024];
struct Buffer { char buf[MAX_KB*1024]; };
Buffer * buf1 = new (heap) Buffer;
Buffer * buf2 = new (heap) Buffer;
memset(buf1, 0, MAX_KB*1024);
memset(buf2, 0, MAX_KB*1024);