diff options
author | Nathan Binkert <nate@binkert.org> | 2011-12-13 11:49:27 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2011-12-13 11:49:27 -0800 |
commit | 6ef9691035623ba6945e237a41f0dca04db637bb (patch) | |
tree | 94a81d0d368991f4ed657e1849ed1e10b96eca2b /src/dev/sparc | |
parent | 9b52717a92ed9592bd98a41683509f538262a5c7 (diff) | |
download | gem5-6ef9691035623ba6945e237a41f0dca04db637bb.tar.xz |
gcc: fix unused variable warnings from GCC 4.6.1
--HG--
extra : rebase_source : f9e22de341493a25ac6106c16ac35c61c128a080
Diffstat (limited to 'src/dev/sparc')
-rw-r--r-- | src/dev/sparc/mm_disk.cc | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/dev/sparc/mm_disk.cc b/src/dev/sparc/mm_disk.cc index 1921f6d96..0095d9f1d 100644 --- a/src/dev/sparc/mm_disk.cc +++ b/src/dev/sparc/mm_disk.cc @@ -56,7 +56,6 @@ MmDisk::read(PacketPtr pkt) { Addr accessAddr; off_t sector; - off_t bytes_read; uint16_t d16; uint32_t d32; uint64_t d64; @@ -68,10 +67,16 @@ MmDisk::read(PacketPtr pkt) if (sector != curSector) { if (dirty) { - bytes_read = image->write(diskData, curSector); - assert(bytes_read == SectorSize); +#ifndef NDEBUG + off_t bytes_written = +#endif + image->write(diskData, curSector); + assert(bytes_written == SectorSize); } - bytes_read = image->read(diskData, sector); +#ifndef NDEBUG + off_t bytes_read = +#endif + image->read(diskData, sector); assert(bytes_read == SectorSize); curSector = sector; } @@ -109,7 +114,6 @@ MmDisk::write(PacketPtr pkt) { Addr accessAddr; off_t sector; - off_t bytes_read; uint16_t d16; uint32_t d32; uint64_t d64; @@ -121,10 +125,16 @@ MmDisk::write(PacketPtr pkt) if (sector != curSector) { if (dirty) { - bytes_read = image->write(diskData, curSector); - assert(bytes_read == SectorSize); +#ifndef NDEBUG + off_t bytes_written = +#endif + image->write(diskData, curSector); + assert(bytes_written == SectorSize); } - bytes_read = image->read(diskData, sector); +#ifndef NDEBUG + off_t bytes_read = +#endif + image->read(diskData, sector); assert(bytes_read == SectorSize); curSector = sector; } @@ -164,9 +174,11 @@ MmDisk::serialize(std::ostream &os) { // just write any dirty changes to the cow layer it will take care of // serialization - int bytes_read; if (dirty) { - bytes_read = image->write(diskData, curSector); +#ifndef NDEBUG + int bytes_read = +#endif + image->write(diskData, curSector); assert(bytes_read == SectorSize); } } |