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<PageTableBase *>(new
ArchPageTable(name(), _pid, system)) : ^ build/X86/sim/process.cc:138:64:
error: field '_pid' is uninitialized when used here
[-Werror,-Wuninitialized] static_cast<PageTableBase *>(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 <jason@lowepower.com>
This commit is contained in:
Bjoern A. Zeeb 2017-02-09 19:03:58 -05:00
parent b673f2aaa4
commit 0852f0cfc6

View file

@ -134,8 +134,9 @@ Process::Process(ProcessParams * params)
useArchPT(params->useArchPT),
kvmInSE(params->kvmInSE),
pTable(useArchPT ?
static_cast<PageTableBase *>(new ArchPageTable(name(), _pid, system)) :
static_cast<PageTableBase *>(new FuncPageTable(name(), _pid))),
static_cast<PageTableBase *>(new ArchPageTable(name(), params->pid,
system)) :
static_cast<PageTableBase *>(new FuncPageTable(name(), params->pid))),
initVirtMem(system->getSystemPort(), this,
SETranslatingPortProxy::Always),
fd_array(make_shared<array<FDEntry, NUM_FDS>>()),