From 0852f0cfc61a543d1aa1add3bc51063be3c2a39d Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2017 19:03:58 -0500 Subject: [PATCH] sim: fix build breakage in process.cc after brandon@11801 Seeing build breakage after brandon@11801: [ CXX] X86/sim/process.cc -> .o build/X86/sim/process.cc:137:64: error: field '_pid' is uninitialized when used here [-Werror,-Wuninitialized] static_cast(new ArchPageTable(name(), _pid, system)) : ^ build/X86/sim/process.cc:138:64: error: field '_pid' is uninitialized when used here [-Werror,-Wuninitialized] static_cast(new FuncPageTable(name(), _pid))), ^ 2 errors generated. Testing Done: Compiles now on FreeBSD 10 with clang. Reviewed at http://reviews.gem5.org/r/3804/ Signed-off-by: Jason Lowe-Power --- src/sim/process.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sim/process.cc b/src/sim/process.cc index ff6297bbb..961da1ecd 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -134,8 +134,9 @@ Process::Process(ProcessParams * params) useArchPT(params->useArchPT), kvmInSE(params->kvmInSE), pTable(useArchPT ? - static_cast(new ArchPageTable(name(), _pid, system)) : - static_cast(new FuncPageTable(name(), _pid))), + static_cast(new ArchPageTable(name(), params->pid, + system)) : + static_cast(new FuncPageTable(name(), params->pid))), initVirtMem(system->getSystemPort(), this, SETranslatingPortProxy::Always), fd_array(make_shared>()), -- 2.30.2