From 4565f2b68914b34d53b597f16d4021150cf688a3 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Thu, 27 Mar 2025 15:35:40 +0100 Subject: [PATCH] Initialize class fields to null/zero Silence a couple of static analyzer warnings. --- .../Source/Interface/IR/Passes/x87StackOptimizationPass.cpp | 2 +- Source/Tools/LinuxEmulation/LinuxSyscalls/x32/Types.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp b/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp index 5b2204a48..43303a4e0 100644 --- a/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp +++ b/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp @@ -345,7 +345,7 @@ private: bool SlowPath = false; // Keeping IREmitter not to pass arguments around IREmitter* IREmit = nullptr; - IRListView* IR; + IRListView* IR = nullptr; }; inline void X87StackOptimization::InvalidateCaches() { diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/x32/Types.h b/Source/Tools/LinuxEmulation/LinuxSyscalls/x32/Types.h index f76c784f7..b106e3cf1 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/x32/Types.h +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/x32/Types.h @@ -1343,6 +1343,9 @@ struct shmid_ds_32 { shm_cpid = buf.shm_cpid; shm_lpid = buf.shm_lpid; shm_nattch = buf.shm_nattch; + shm_unused = 0; + shm_unused2 = 0; + shm_unused3 = 0; } };