From 64ccfecf9579abbe553ed1825dcaead9a3daa34f Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 28 Nov 2011 04:34:18 -0500 Subject: [PATCH] SPARC: Fixing a minor copy-paste bug using the wrong variable There was a bug in the mm_disk implementation where a copy paste error resulted in the d32 variable not being initialised (as it incorrectly was used instead of d16), and gcc 4.5 complaining. --HG-- extra : rebase_source : 9515e87b188b9eac189da8034cb13c3bf7d9e20b --- src/dev/sparc/mm_disk.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/sparc/mm_disk.cc b/src/dev/sparc/mm_disk.cc index b86905387..1921f6d96 100644 --- a/src/dev/sparc/mm_disk.cc +++ b/src/dev/sparc/mm_disk.cc @@ -83,7 +83,7 @@ MmDisk::read(PacketPtr pkt) break; case sizeof(uint16_t): memcpy(&d16, diskData + (accessAddr % SectorSize), 2); - pkt->set(htobe(d32)); + pkt->set(htobe(d16)); DPRINTF(IdeDisk, "reading word %#x value= %#x\n", accessAddr, d16); break; case sizeof(uint32_t): -- 2.30.2