mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
fix new clang warnings (from upgrading clang)
This commit is contained in:
parent
b950d8eea8
commit
1290fda6a8
@ -1703,9 +1703,6 @@ bool instanceOf(Thread* t, GcClass* class_, object o);
|
||||
template <class T>
|
||||
T* GcObject::as(Thread* t UNUSED)
|
||||
{
|
||||
if (this == 0) {
|
||||
return 0;
|
||||
}
|
||||
assertT(t,
|
||||
t->m->unsafe || instanceOf(t,
|
||||
reinterpret_cast<GcClass*>(arrayBodyUnsafe(
|
||||
|
@ -1909,9 +1909,7 @@ void setStubRead(Context* c, StubReadPair* p, Value* v)
|
||||
if (DebugReads) {
|
||||
fprintf(stderr, "add stub read %p to %p\n", r, v);
|
||||
}
|
||||
// TODO: this is rather icky looking... but despite how it looks, it will
|
||||
// not cause an NPE
|
||||
((Event*)0)->addRead(c, v, r);
|
||||
finishAddRead(c, v, r);
|
||||
|
||||
p->value = v;
|
||||
p->read = r;
|
||||
@ -2113,9 +2111,7 @@ void addForkElement(Context* c, Value* v, ForkState* state, unsigned index)
|
||||
if (DebugReads) {
|
||||
fprintf(stderr, "add multi read %p to %p\n", r, v);
|
||||
}
|
||||
// TODO: this is rather icky looking... but despite how it looks, it will not
|
||||
// cause an NPE
|
||||
((Event*)0)->addRead(c, v, r);
|
||||
finishAddRead(c, v, r);
|
||||
|
||||
ForkElement* p = state->elements + index;
|
||||
p->value = v;
|
||||
|
@ -136,16 +136,20 @@ void Event::addRead(Context* c, Value* v, Read* r)
|
||||
v,
|
||||
v->lastRead,
|
||||
this,
|
||||
(this ? this->name() : 0));
|
||||
this->name());
|
||||
}
|
||||
|
||||
r->event = this;
|
||||
r->eventNext = this->reads;
|
||||
this->reads = r;
|
||||
++this->readCount;
|
||||
|
||||
finishAddRead(c, v, r);
|
||||
}
|
||||
|
||||
void finishAddRead(Context* c, Value* v, Read* r)
|
||||
{
|
||||
r->value = v;
|
||||
if (this) {
|
||||
r->event = this;
|
||||
r->eventNext = this->reads;
|
||||
this->reads = r;
|
||||
++this->readCount;
|
||||
}
|
||||
|
||||
if (v->lastRead) {
|
||||
if (DebugReads) {
|
||||
|
@ -90,6 +90,8 @@ class Event {
|
||||
unsigned readCount;
|
||||
};
|
||||
|
||||
void finishAddRead(Context* c, Value* v, Read* r);
|
||||
|
||||
class StubReadPair {
|
||||
public:
|
||||
Value* value;
|
||||
|
@ -8266,11 +8266,11 @@ class CompilationHandlerList {
|
||||
|
||||
void dispose(Allocator* allocator)
|
||||
{
|
||||
if (this) {
|
||||
if (next) {
|
||||
next->dispose(allocator);
|
||||
handler->dispose();
|
||||
allocator->free(this, sizeof(*this));
|
||||
}
|
||||
handler->dispose();
|
||||
allocator->free(this, sizeof(*this));
|
||||
}
|
||||
|
||||
CompilationHandlerList* next;
|
||||
@ -8804,7 +8804,9 @@ class MyProcessor : public Processor {
|
||||
#endif
|
||||
}
|
||||
|
||||
compilationHandlers->dispose(allocator);
|
||||
if(compilationHandlers) {
|
||||
compilationHandlers->dispose(allocator);
|
||||
}
|
||||
|
||||
signals.unregisterHandler(SignalRegistrar::SegFault);
|
||||
signals.unregisterHandler(SignalRegistrar::DivideByZero);
|
||||
|
@ -35,7 +35,7 @@ void* operator new(size_t size)
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void operator delete(void*)
|
||||
void operator delete(void*) throw()
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user