From d0dd10ce6b33fdb559a3dd5c4399a7900879cb04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 16 Jun 2026 11:03:53 +0200 Subject: [PATCH] Avoid memsetting a non-POD struct (fixes compiler warning) --- Core/HLE/sceNetAdhocMatching.cpp | 2 +- unittest/TestLoongArch64Emitter.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceNetAdhocMatching.cpp b/Core/HLE/sceNetAdhocMatching.cpp index 14c6116a2a..d96b0d8c90 100644 --- a/Core/HLE/sceNetAdhocMatching.cpp +++ b/Core/HLE/sceNetAdhocMatching.cpp @@ -1784,7 +1784,7 @@ static int sceNetAdhocMatchingCreate(int mode, int maxnum, int port, int rxbufle getLocalMac(&localmac); // Clear Memory - memset(context, 0, sizeof(SceNetAdhocMatchingContext)); + context = {}; // Allocate Receive Buffer context->rxbuf = (uint8_t*)malloc(rxbuflen); diff --git a/unittest/TestLoongArch64Emitter.cpp b/unittest/TestLoongArch64Emitter.cpp index a01e122601..94436fb193 100644 --- a/unittest/TestLoongArch64Emitter.cpp +++ b/unittest/TestLoongArch64Emitter.cpp @@ -38,7 +38,7 @@ bool TestLoongArch64Emitter(){ cpu_info.LOONGARCH_LBT_MIPS = true; cpu_info.LOONGARCH_PTW = true; - u32 code[1024]; + u32 code[1024]{}; LoongArch64Emitter emitter((u8 *)code, (u8 *)code); emitter.ADD_W(R12, R13, R14); // t0, t1, t2 @@ -77,4 +77,4 @@ bool TestLoongArch64Emitter(){ } return true; -} \ No newline at end of file +}