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/sim/process.cc | 5 +++-- src/sim/sim_events.hh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/sim') diff --git a/src/sim/process.cc b/src/sim/process.cc index cbafb62fe..0107f63a2 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -290,7 +290,8 @@ Process::allocateMem(Addr vaddr, int64_t size, bool clobber) { int npages = divCeil(size, (int64_t)PageBytes); Addr paddr = system->allocPhysPages(npages); - pTable->map(vaddr, paddr, size, clobber ? PageTableBase::Clobber : 0); + pTable->map(vaddr, paddr, size, + clobber ? PageTableBase::Clobber : PageTableBase::Zero); } bool @@ -454,7 +455,7 @@ bool Process::map(Addr vaddr, Addr paddr, int size, bool cacheable) { pTable->map(vaddr, paddr, size, - cacheable ? 0 : PageTableBase::Uncacheable); + cacheable ? PageTableBase::Zero : PageTableBase::Uncacheable); return true; } diff --git a/src/sim/sim_events.hh b/src/sim/sim_events.hh index 9a79a2e9d..8fb04408a 100644 --- a/src/sim/sim_events.hh +++ b/src/sim/sim_events.hh @@ -66,7 +66,7 @@ class GlobalSimLoopExitEvent : public GlobalEvent Tick repeat = 0); const std::string getCause() const { return cause; } - const int getCode() const { return code; } + int getCode() const { return code; } void process(); // process event @@ -86,7 +86,7 @@ class LocalSimLoopExitEvent : public Event LocalSimLoopExitEvent(const std::string &_cause, int c, Tick repeat = 0); const std::string getCause() const { return cause; } - const int getCode() const { return code; } + int getCode() const { return code; } void process() override; // process event @@ -111,7 +111,7 @@ class CountedDrainEvent : public Event void setCount(int _count) { count = _count; } - const int getCount() const { return count; } + int getCount() const { return count; } }; // -- cgit v1.2.3