From: Andreas Hansson Date: Mon, 28 Nov 2011 09:34:18 +0000 (-0500) Subject: SPARC: Fixing a minor copy-paste bug using the wrong variable X-Git-Tag: stable_2012_02_02~19 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64ccfecf9579abbe553ed1825dcaead9a3daa34f;p=gem5.git 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 --- 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):