mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
fix GCC 4.4 warnings
This commit is contained in:
parent
34167cf63c
commit
79558e7e34
@ -44,6 +44,12 @@ class Stream {
|
|||||||
|
|
||||||
void read(uint8_t* data, unsigned size) {
|
void read(uint8_t* data, unsigned size) {
|
||||||
if (size > this->size - position_) {
|
if (size > this->size - position_) {
|
||||||
|
// GCC 4.4 will give us an uninitialized value warning in read1
|
||||||
|
// unless we do this: (it's smart enough to track data flow
|
||||||
|
// across functions but not smart enough to see we won't return
|
||||||
|
// from Client::handleError)
|
||||||
|
*data = 0;
|
||||||
|
|
||||||
client->handleError();
|
client->handleError();
|
||||||
} else {
|
} else {
|
||||||
memcpy(data, this->data + position_, size);
|
memcpy(data, this->data + position_, size);
|
||||||
|
@ -1560,11 +1560,7 @@ writeAccessor(Output* out, Object* member, Object* offset, bool unsafe = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memberOwner(member)->type == Object::Pod) {
|
out->write(">(reinterpret_cast<uint8_t*>(o)");
|
||||||
out->write(">(o->body");
|
|
||||||
} else {
|
|
||||||
out->write(">(reinterpret_cast<uint8_t*>(o)");
|
|
||||||
}
|
|
||||||
if (endsWith("[0]", typeName)
|
if (endsWith("[0]", typeName)
|
||||||
or (member->type != Object::Scalar
|
or (member->type != Object::Scalar
|
||||||
and memberTypeObject(member)))
|
and memberTypeObject(member)))
|
||||||
|
Loading…
Reference in New Issue
Block a user