From: Lisa Hsu Date: Thu, 1 Sep 2011 22:25:54 +0000 (-0700) Subject: Fix build for gcc-4.2 opt/fast X-Git-Tag: stable_2012_02_02~102 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6a2ef22ffc70d2467a2b9c0bc1532f73be067b5;p=gem5.git Fix build for gcc-4.2 opt/fast Even though the code is safe, compiler flags a warning here, which are treated as errors for fast/opt. I know it's redundant but it has no side effects and fixes the compile. --- diff --git a/src/mem/cache/prefetch/base.cc b/src/mem/cache/prefetch/base.cc index 52d117140..0f9290186 100644 --- a/src/mem/cache/prefetch/base.cc +++ b/src/mem/cache/prefetch/base.cc @@ -138,7 +138,7 @@ BasePrefetcher::getPacket() return NULL; } - PacketPtr pkt; + PacketPtr pkt = *pf.begin(); while (!pf.empty()) { pkt = *pf.begin(); pf.pop_front();