summaryrefslogtreecommitdiff
path: root/src/dev/sparc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2012-01-07 02:16:37 -0800
committerGabe Black <gblack@eecs.umich.edu>2012-01-07 02:16:37 -0800
commit241cc0c8402f1b9f2ec20d1cc152d96930959b2a (patch)
tree666717370cc9db4775ef46c10f7d8a92a34f40e2 /src/dev/sparc
parentec936364b7238cddea7734ea79c6e04b52a683c6 (diff)
parent4b772782871f265cf7372c984ad750803396938c (diff)
downloadgem5-241cc0c8402f1b9f2ec20d1cc152d96930959b2a.tar.xz
Another merge with the main repository.
Diffstat (limited to 'src/dev/sparc')
-rw-r--r--src/dev/sparc/mm_disk.cc32
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);
}
}