It's not a big issue but here I go.
spall_buffer_init does not use the first parameter it receives.
Here's the workaround for warning suppression:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
SPALL_FN bool spall_buffer_init(SpallProfile *ctx, SpallBuffer *wb) {
#pragma GCC diagnostic pop
// Fails if buffer is not big enough to contain at least one event!
if (wb->length < sizeof(SpallBufferHeader) + sizeof(SpallBeginEventMax)) {
return false;
}
wb->head = sizeof(SpallBufferHeader);
return true;
}