Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix compiler warnings.

  • Loading branch information...
commit 3cd115df1c5288f34c1e206c99e827af67885cd6 1 parent 057a803
@rlsosborne rlsosborne authored
View
4 Chanend.h
@@ -82,7 +82,7 @@ class Chanend : public EventableResource, public ChanEndpoint {
pausedIn = 0;
inPacket = false;
junkPacket = false;
- setInUseOn(t);
+ eventableSetInUseOn(t);
setJunkIncoming(false);
return true;
}
@@ -92,7 +92,7 @@ class Chanend : public EventableResource, public ChanEndpoint {
if (!buf.empty() || getSource() || inPacket) {
return false;
}
- setInUseOff();
+ eventableSetInUseOff();
setJunkIncoming(true);
return true;
}
View
2  Core.h
@@ -247,7 +247,7 @@ class Core {
if (!resource[type][i]->isInUse()) {
bool allocated = resource[type][i]->alloc(current);
assert(allocated);
- allocated = allocated; // Silence compiler.
+ (void)allocated; // Silence compiler.
return resource[type][i];
}
}
View
2  Port.cpp
@@ -81,7 +81,7 @@ bool Port::setCInUse(ThreadState &thread, bool val, ticks_t time)
}
clearReadyOut(time);
}
- setInUse(thread, val);
+ eventableSetInUse(thread, val);
return true;
}
View
10 Resource.cpp
@@ -107,7 +107,7 @@ void EventableResource::completeEvent()
owner->pc = vector;
}
-void EventableResource::setInUseOn(ThreadState &t)
+void EventableResource::eventableSetInUseOn(ThreadState &t)
{
if (isInUse())
clearOwner();
@@ -119,7 +119,7 @@ void EventableResource::setInUseOn(ThreadState &t)
Resource::setInUse(true);
}
-void EventableResource::setInUseOff()
+void EventableResource::eventableSetInUseOff()
{
if (!isInUse())
return;
@@ -127,12 +127,12 @@ void EventableResource::setInUseOff()
Resource::setInUse(false);
}
-void EventableResource::setInUse(ThreadState &t, bool val)
+void EventableResource::eventableSetInUse(ThreadState &t, bool val)
{
if (val)
- setInUseOn(t);
+ eventableSetInUseOn(t);
else
- setInUseOff();
+ eventableSetInUseOff();
}
uint32_t EventableResource::getTruncatedEV(ThreadState &thread) const
View
8 Resource.h
@@ -247,7 +247,7 @@ class Resource {
protected:
Resource(ResourceType t) : inUse(0), ID(t) {}
- virtual void setInUse(bool val)
+ void setInUse(bool val)
{
inUse = val;
}
@@ -294,9 +294,9 @@ class EventableResource : public Resource, public Runnable {
/// executing, otherwise the owner is scheduled.s
void event(ticks_t time);
- void setInUse(ThreadState &t, bool val);
- void setInUseOn(ThreadState &t);
- void setInUseOff();
+ void eventableSetInUse(ThreadState &t, bool val);
+ void eventableSetInUseOn(ThreadState &t);
+ void eventableSetInUseOff();
virtual bool seeEventEnable(ticks_t time) = 0;
View
4 Timer.h
@@ -27,13 +27,13 @@ class Timer : public EventableResource {
assert(!isInUse() && "Trying to allocate in use timer");
after = false;
data = 0;
- setInUseOn(t);
+ eventableSetInUseOn(t);
return true;
}
bool free()
{
- setInUseOff();
+ eventableSetInUseOff();
return true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.