From 12eb0343784f52994110df7e7fce4a0b639a6ec3 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 11 Jan 2016 05:52:20 -0500 Subject: scons: Enable -Wextra by default Make best use of the compiler, and enable -Wextra as well as -Wall. There are a few issues that had to be resolved, but they are all trivial. --- src/dev/sparc/iob.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/dev/sparc') diff --git a/src/dev/sparc/iob.cc b/src/dev/sparc/iob.cc index c8462b9be..55cb93f37 100644 --- a/src/dev/sparc/iob.cc +++ b/src/dev/sparc/iob.cc @@ -91,7 +91,8 @@ Iob::readIob(PacketPtr pkt) { Addr accessAddr = pkt->getAddr() - iobManAddr; - if (accessAddr >= IntManAddr && accessAddr < IntManAddr + IntManSize) { + assert(IntManAddr == 0); + if (accessAddr < IntManAddr + IntManSize) { int index = (accessAddr - IntManAddr) >> 3; uint64_t data = intMan[index].cpu << 8 | intMan[index].vector << 0; pkt->set(data); @@ -186,7 +187,8 @@ Iob::writeIob(PacketPtr pkt) int index; uint64_t data; - if (accessAddr >= IntManAddr && accessAddr < IntManAddr + IntManSize) { + assert(IntManAddr == 0); + if (accessAddr < IntManAddr + IntManSize) { index = (accessAddr - IntManAddr) >> 3; data = pkt->get(); intMan[index].cpu = bits(data,12,8); -- cgit v1.2.3