From: Bjoern A. Zeeb Date: Fri, 10 Feb 2017 00:03:58 +0000 (-0500) Subject: sim: fix build breakage in process.cc after brandon@11801 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0852f0cfc61a543d1aa1add3bc51063be3c2a39d;p=gem5.git 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 --- 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>()),