From fd580041fe62e51f2386af5be0ad92e735ba1e24 Mon Sep 17 00:00:00 2001 From: Andrea Mondelli Date: Tue, 19 May 2020 01:50:33 +0800 Subject: [PATCH] cpu: fixed unused variable on fast binary When gem5.fast is compiled, an error on a variable used only for debug purposes is raised: build/X86/cpu/o3/mem_dep_unit_impl.hh:262:19: error: unused variable 'producing_store' [-Werror=unused-variable] for (auto producing_store : producing_stores) This patch remove the variable when *.fast is used. Change-Id: Ib77c26073db39644e3525bc16edcb7d3bc871d76 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29252 Tested-by: kokoro Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce --- src/cpu/o3/mem_dep_unit_impl.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/o3/mem_dep_unit_impl.hh b/src/cpu/o3/mem_dep_unit_impl.hh index 9a50341b4..d1eac2996 100644 --- a/src/cpu/o3/mem_dep_unit_impl.hh +++ b/src/cpu/o3/mem_dep_unit_impl.hh @@ -259,7 +259,7 @@ MemDepUnit::insert(const DynInstPtr &inst) } else { // Otherwise make the instruction dependent on the store/barrier. DPRINTF(MemDepUnit, "Adding to dependency list\n"); - for (auto producing_store : producing_stores) + for (auto M5_VAR_USED producing_store : producing_stores) DPRINTF(MemDepUnit, "\tinst PC %s is dependent on [sn:%lli].\n", inst->pcState(), producing_store); -- 2.30.2