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