From 2ac04c11accb46f92cf7f2b7abe40404dbf8c5d6 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 12 Oct 2015 04:08:01 -0400 Subject: misc: Add explicit overrides and fix other clang >= 3.5 issues This patch adds explicit overrides as this is now required when using "-Wall" with clang >= 3.5, the latter now part of the most recent XCode. The patch consequently removes "virtual" for those methods where "override" is added. The latter should be enough of an indication. As part of this patch, a few minor issues that clang >= 3.5 complains about are also resolved (unused methods and variables). --- src/dev/pcidev.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/dev/pcidev.hh') diff --git a/src/dev/pcidev.hh b/src/dev/pcidev.hh index 2064de90e..284b64f09 100644 --- a/src/dev/pcidev.hh +++ b/src/dev/pcidev.hh @@ -76,9 +76,9 @@ class PciDevice : public DmaDevice protected: PciDevice *device; - virtual Tick recvAtomic(PacketPtr pkt); + Tick recvAtomic(PacketPtr pkt) override; - virtual AddrRangeList getAddrRanges() const; + AddrRangeList getAddrRanges() const override; Platform *platform; @@ -234,7 +234,7 @@ class PciDevice : public DmaDevice * * @return a list of non-overlapping address ranges */ - AddrRangeList getAddrRanges() const; + AddrRangeList getAddrRanges() const override; /** * Constructor for PCI Dev. This function copies data from the @@ -243,7 +243,7 @@ class PciDevice : public DmaDevice */ PciDevice(const Params *params); - virtual void init(); + void init() override; /** * Serialize this object to the given output stream. @@ -259,8 +259,8 @@ class PciDevice : public DmaDevice void unserialize(CheckpointIn &cp) override; - virtual BaseSlavePort &getSlavePort(const std::string &if_name, - PortID idx = InvalidPortID) + BaseSlavePort &getSlavePort(const std::string &if_name, + PortID idx = InvalidPortID) override { if (if_name == "config") { return configPort; -- cgit v1.2.3