diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-10-12 04:08:01 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-10-12 04:08:01 -0400 |
commit | 2ac04c11accb46f92cf7f2b7abe40404dbf8c5d6 (patch) | |
tree | 368b579a0b45840a5248fca568f89a8ea7ca9d49 /src/dev/i8254xGBe.hh | |
parent | 22c04190c607b9360d9a23548f8a54e83cf0e74a (diff) | |
download | gem5-2ac04c11accb46f92cf7f2b7abe40404dbf8c5d6.tar.xz |
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).
Diffstat (limited to 'src/dev/i8254xGBe.hh')
-rw-r--r-- | src/dev/i8254xGBe.hh | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/dev/i8254xGBe.hh b/src/dev/i8254xGBe.hh index 5b2d60916..f1802ab24 100644 --- a/src/dev/i8254xGBe.hh +++ b/src/dev/i8254xGBe.hh @@ -342,13 +342,13 @@ class IGbE : public EtherDevice class RxDescCache : public DescCache<iGbReg::RxDesc> { protected: - virtual Addr descBase() const { return igbe->regs.rdba(); } - virtual long descHead() const { return igbe->regs.rdh(); } - virtual long descLen() const { return igbe->regs.rdlen() >> 4; } - virtual long descTail() const { return igbe->regs.rdt(); } - virtual void updateHead(long h) { igbe->regs.rdh(h); } - virtual void enableSm(); - virtual void fetchAfterWb() { + Addr descBase() const override { return igbe->regs.rdba(); } + long descHead() const override { return igbe->regs.rdh(); } + long descLen() const override { return igbe->regs.rdlen() >> 4; } + long descTail() const override { return igbe->regs.rdt(); } + void updateHead(long h) override { igbe->regs.rdh(h); } + void enableSm() override; + void fetchAfterWb() override { if (!igbe->rxTick && igbe->drainState() == DrainState::Running) fetchDescriptors(); } @@ -391,7 +391,7 @@ class IGbE : public EtherDevice EventWrapper<RxDescCache, &RxDescCache::pktSplitDone> pktHdrEvent; EventWrapper<RxDescCache, &RxDescCache::pktSplitDone> pktDataEvent; - virtual bool hasOutstandingEvents(); + bool hasOutstandingEvents() override; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; @@ -403,14 +403,14 @@ class IGbE : public EtherDevice class TxDescCache : public DescCache<iGbReg::TxDesc> { protected: - virtual Addr descBase() const { return igbe->regs.tdba(); } - virtual long descHead() const { return igbe->regs.tdh(); } - virtual long descTail() const { return igbe->regs.tdt(); } - virtual long descLen() const { return igbe->regs.tdlen() >> 4; } - virtual void updateHead(long h) { igbe->regs.tdh(h); } - virtual void enableSm(); - virtual void actionAfterWb(); - virtual void fetchAfterWb() { + Addr descBase() const override { return igbe->regs.tdba(); } + long descHead() const override { return igbe->regs.tdh(); } + long descTail() const override { return igbe->regs.tdt(); } + long descLen() const override { return igbe->regs.tdlen() >> 4; } + void updateHead(long h) override { igbe->regs.tdh(h); } + void enableSm() override; + void actionAfterWb() override; + void fetchAfterWb() override { if (!igbe->txTick && igbe->drainState() == DrainState::Running) fetchDescriptors(); } @@ -497,7 +497,7 @@ class IGbE : public EtherDevice completionEnabled = enabled; } - virtual bool hasOutstandingEvents(); + bool hasOutstandingEvents() override; void nullCallback() { DPRINTF(EthernetDesc, "Completion writeback complete\n"); @@ -521,16 +521,16 @@ class IGbE : public EtherDevice IGbE(const Params *params); ~IGbE(); - virtual void init(); + void init() override; - virtual EtherInt *getEthPort(const std::string &if_name, int idx); + EtherInt *getEthPort(const std::string &if_name, int idx) override; Tick lastInterrupt; - virtual Tick read(PacketPtr pkt); - virtual Tick write(PacketPtr pkt); + Tick read(PacketPtr pkt) override; + Tick write(PacketPtr pkt) override; - virtual Tick writeConfig(PacketPtr pkt); + Tick writeConfig(PacketPtr pkt) override; bool ethRxPkt(EthPacketPtr packet); void ethTxDone(); |