mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
Check return value of fwrite() calls.
This is to satisfy GCC 4.3.2 (on Ubuntu 8.10), which requires it.
This commit is contained in:
parent
a3c8a0460d
commit
f13bf44e87
@ -215,21 +215,21 @@ get(object o, unsigned offsetInWords)
|
|||||||
void
|
void
|
||||||
write1(Context* c, uint8_t v)
|
write1(Context* c, uint8_t v)
|
||||||
{
|
{
|
||||||
fwrite(&v, 1, 1, c->out);
|
size_t n UNUSED = fwrite(&v, 1, 1, c->out);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
write4(Context* c, uint32_t v)
|
write4(Context* c, uint32_t v)
|
||||||
{
|
{
|
||||||
uint8_t b[] = { v >> 24, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF };
|
uint8_t b[] = { v >> 24, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF };
|
||||||
fwrite(b, 4, 1, c->out);
|
size_t n UNUSED = fwrite(b, 4, 1, c->out);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
writeString(Context* c, int8_t* p, unsigned size)
|
writeString(Context* c, int8_t* p, unsigned size)
|
||||||
{
|
{
|
||||||
write4(c, size);
|
write4(c, size);
|
||||||
fwrite(p, size, 1, c->out);
|
size_t n UNUSED = fwrite(p, size, 1, c->out);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
|
Loading…
Reference in New Issue
Block a user