From 2edcd3dbc82b68658a2e68070a92d053a2001c61 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Thu, 25 Jun 2020 09:27:58 +0100 Subject: [PATCH] sim: Fix -Werror=maybe-uninitialized in system.cc The patch is simply initializing when to 0 before unserializing the real value Change-Id: I4e19eeafa9334116b440948af1943f3835803671 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30594 Tested-by: kokoro Reviewed-by: Daniel Carvalho Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- src/sim/system.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sim/system.cc b/src/sim/system.cc index 413341274..6e5975e9d 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -447,7 +447,7 @@ System::unserialize(CheckpointIn &cp) UNSERIALIZE_SCALAR(pagePtr); for (auto &t: threads.threads) { - Tick when; + Tick when = 0; ContextID id = t.context->contextId(); if (!optParamIn(cp, csprintf("quiesceEndTick_%d", id), when) || !when || !t.resumeEvent) { -- 2.30.2