diff options
author | Tushar Krishna <tushar@csail.mit.edu> | 2011-03-22 23:38:09 -0400 |
---|---|---|
committer | Tushar Krishna <tushar@csail.mit.edu> | 2011-03-22 23:38:09 -0400 |
commit | 531f54fb510e76b8edb1beb83bcae372df3521f9 (patch) | |
tree | ec0d6b48de7ec4e47656c4540e83bebdc53d0aef /src | |
parent | 1764ebbf30cfd94eb7ccc618ade0d70049db000e (diff) | |
download | gem5-531f54fb510e76b8edb1beb83bcae372df3521f9.tar.xz |
This patch fixes a build error in networktest.cc that occurs with gcc4.2
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/testers/networktest/networktest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/testers/networktest/networktest.cc b/src/cpu/testers/networktest/networktest.cc index 4f4c30931..73d9364b7 100644 --- a/src/cpu/testers/networktest/networktest.cc +++ b/src/cpu/testers/networktest/networktest.cc @@ -165,7 +165,7 @@ NetworkTest::completeRequest(PacketPtr pkt) assert(pkt->isResponse()); noResponseCycles = 0; - delete pkt->req; + delete req; delete pkt; } @@ -191,8 +191,8 @@ NetworkTest::tick() // - generate a random number between 0 and 10^precision // - send pkt if this number is < injRate*(10^precision) bool send_this_cycle; - int injRange = pow(10, precision); - unsigned trySending = random() % injRange; + double injRange = pow((double) 10, (double) precision); + unsigned trySending = random() % (int) injRange; if (trySending < injRate*injRange) send_this_cycle = true; else |