aboutsummaryrefslogtreecommitdiff
path: root/target/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'target/ppc')
-rw-r--r--target/ppc/kvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index a3c31b4e48..01baea467f 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -542,10 +542,11 @@ static void kvm_get_one_spr(CPUState *cs, uint64_t id, int spr)
{
PowerPCCPU *cpu = POWERPC_CPU(cs);
CPUPPCState *env = &cpu->env;
+ /* Init 'val' to avoid "uninitialised value" Valgrind warnings */
union {
uint32_t u32;
uint64_t u64;
- } val;
+ } val = { };
struct kvm_one_reg reg = {
.id = id,
.addr = (uintptr_t) &val,