diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-09 04:36:31 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-09 04:36:31 -0400 |
commit | da4539dc749c3d29c03de9b3130f1c9a7266be9d (patch) | |
tree | c58cfe7bb1b489f440883cb4ec8a2a25e546aa20 /src/mem/request.hh | |
parent | 346fe7337009980566e023a60a09391ed893a5c0 (diff) | |
download | gem5-da4539dc749c3d29c03de9b3130f1c9a7266be9d.tar.xz |
misc: Fix a number of unitialised variables and members
Static analysis unearther a bunch of uninitialised variables and
members, and this patch addresses the problem. In all cases these
omissions seem benign in the end, but at least fixing them means less
false positives next time round.
Diffstat (limited to 'src/mem/request.hh')
-rw-r--r-- | src/mem/request.hh | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/mem/request.hh b/src/mem/request.hh index e84a77272..a064e0b05 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -259,8 +259,10 @@ class Request * default constructor.) */ Request() - : _taskId(ContextSwitchTaskId::Unknown), - translateDelta(0), accessDelta(0), depth(0) + : _paddr(0), _size(0), _masterId(invldMasterId), _time(0), + _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0), + _extraData(0), _contextId(0), _threadId(0), _pc(0), + translateDelta(0), accessDelta(0), depth(0) {} /** @@ -269,19 +271,28 @@ class Request * These fields are adequate to perform a request. */ Request(Addr paddr, int size, Flags flags, MasterID mid) - : _taskId(ContextSwitchTaskId::Unknown) + : _paddr(0), _size(0), _masterId(invldMasterId), _time(0), + _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0), + _extraData(0), _contextId(0), _threadId(0), _pc(0), + translateDelta(0), accessDelta(0), depth(0) { setPhys(paddr, size, flags, mid); } Request(Addr paddr, int size, Flags flags, MasterID mid, Tick time) - : _taskId(ContextSwitchTaskId::Unknown) + : _paddr(0), _size(0), _masterId(invldMasterId), _time(0), + _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0), + _extraData(0), _contextId(0), _threadId(0), _pc(0), + translateDelta(0), accessDelta(0), depth(0) { setPhys(paddr, size, flags, mid, time); } Request(Addr paddr, int size, Flags flags, MasterID mid, Tick time, Addr pc) - : _taskId(ContextSwitchTaskId::Unknown) + : _paddr(0), _size(0), _masterId(invldMasterId), _time(0), + _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0), + _extraData(0), _contextId(0), _threadId(0), _pc(0), + translateDelta(0), accessDelta(0), depth(0) { setPhys(paddr, size, flags, mid, time); privateFlags.set(VALID_PC); @@ -290,7 +301,10 @@ class Request Request(int asid, Addr vaddr, int size, Flags flags, MasterID mid, Addr pc, int cid, ThreadID tid) - : _taskId(ContextSwitchTaskId::Unknown) + : _paddr(0), _size(0), _masterId(invldMasterId), _time(0), + _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0), + _extraData(0), _contextId(0), _threadId(0), _pc(0), + translateDelta(0), accessDelta(0), depth(0) { setVirt(asid, vaddr, size, flags, mid, pc); setThreadContext(cid, tid); |