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/sim/system.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sim/system.hh') diff --git a/src/sim/system.hh b/src/sim/system.hh index be0538839..c67f70219 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -97,9 +97,9 @@ class System : public MemObject SystemPort(const std::string &_name, MemObject *_owner) : MasterPort(_name, _owner) { } - bool recvTimingResp(PacketPtr pkt) + bool recvTimingResp(PacketPtr pkt) override { panic("SystemPort does not receive timing!\n"); return false; } - void recvReqRetry() + void recvReqRetry() override { panic("SystemPort does not expect retry!\n"); } }; @@ -111,7 +111,7 @@ class System : public MemObject * After all objects have been created and all ports are * connected, check that the system port is connected. */ - virtual void init(); + void init() override; /** * Get a reference to the system port that can be used by @@ -127,7 +127,7 @@ class System : public MemObject * Additional function to return the Port of a memory object. */ BaseMasterPort& getMasterPort(const std::string &if_name, - PortID idx = InvalidPortID); + PortID idx = InvalidPortID) override; /** @{ */ /** @@ -335,7 +335,7 @@ class System : public MemObject return masterIds.size(); } - virtual void regStats(); + void regStats() override; /** * Called by pseudo_inst to track the number of work items started by this * system. @@ -487,7 +487,7 @@ class System : public MemObject System(Params *p); ~System(); - void initState(); + void initState() override; const Params *params() const { return (const Params *)_params; } -- cgit v1.2.3