mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
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:
parent
e4ac393de4
commit
d0578700bc
6
repos/os/src/test/cache/main.cc
vendored
6
repos/os/src/test/cache/main.cc
vendored
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user