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/cpu/testers | |
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/cpu/testers')
-rw-r--r-- | src/cpu/testers/networktest/networktest.cc | 1 | ||||
-rw-r--r-- | src/cpu/testers/traffic_gen/generators.hh | 6 | ||||
-rw-r--r-- | src/cpu/testers/traffic_gen/traffic_gen.cc | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/cpu/testers/networktest/networktest.cc b/src/cpu/testers/networktest/networktest.cc index c2d34489b..94dedf648 100644 --- a/src/cpu/testers/networktest/networktest.cc +++ b/src/cpu/testers/networktest/networktest.cc @@ -84,6 +84,7 @@ NetworkTest::NetworkTest(const Params *p) simCycles(p->sim_cycles), fixedPkts(p->fixed_pkts), maxPackets(p->max_packets), + numPacketsSent(0), trafficType(p->traffic_type), injRate(p->inj_rate), precision(p->precision), diff --git a/src/cpu/testers/traffic_gen/generators.hh b/src/cpu/testers/traffic_gen/generators.hh index 498ef8f37..a3b7e005a 100644 --- a/src/cpu/testers/traffic_gen/generators.hh +++ b/src/cpu/testers/traffic_gen/generators.hh @@ -190,7 +190,7 @@ class LinearGen : public BaseGen startAddr(start_addr), endAddr(end_addr), blocksize(_blocksize), minPeriod(min_period), maxPeriod(max_period), readPercent(read_percent), - dataLimit(data_limit) + dataLimit(data_limit), nextAddr(startAddr), dataManipulated(0) { } void enter(); @@ -267,7 +267,7 @@ class RandomGen : public BaseGen startAddr(start_addr), endAddr(end_addr), blocksize(_blocksize), minPeriod(min_period), maxPeriod(max_period), readPercent(read_percent), - dataLimit(data_limit) + dataLimit(data_limit), dataManipulated(0) { } void enter(); @@ -348,7 +348,7 @@ class DramGen : public RandomGen unsigned int addr_mapping) : RandomGen(_name, master_id, _duration, start_addr, end_addr, _blocksize, min_period, max_period, read_percent, data_limit), - numSeqPkts(num_seq_pkts), countNumSeqPkts(0), + numSeqPkts(num_seq_pkts), countNumSeqPkts(0), addr(0), isRead(true), pageSize(page_size), pageBits(floorLog2(page_size / _blocksize)), bankBits(floorLog2(nbr_of_banks_DRAM)), diff --git a/src/cpu/testers/traffic_gen/traffic_gen.cc b/src/cpu/testers/traffic_gen/traffic_gen.cc index cbff712bc..f865a00b1 100644 --- a/src/cpu/testers/traffic_gen/traffic_gen.cc +++ b/src/cpu/testers/traffic_gen/traffic_gen.cc @@ -59,6 +59,7 @@ TrafficGen::TrafficGen(const TrafficGenParams* p) elasticReq(p->elastic_req), nextTransitionTick(0), nextPacketTick(0), + currState(0), port(name() + ".port", *this), retryPkt(NULL), retryPktTick(0), |