Add warn_unused_result to strbuffer_init.
This adds a compiler warning when strbuffer_init return value is ignored. unpack_object is updated to deal with errors produced while building unrecognized_keys.
This commit is contained in:
@@ -16,7 +16,7 @@ typedef struct {
|
||||
size_t size; /* bytes allocated */
|
||||
} strbuffer_t;
|
||||
|
||||
int strbuffer_init(strbuffer_t *strbuff);
|
||||
int strbuffer_init(strbuffer_t *strbuff) JANSSON_ATTRS(warn_unused_result);
|
||||
void strbuffer_close(strbuffer_t *strbuff);
|
||||
|
||||
void strbuffer_clear(strbuffer_t *strbuff);
|
||||
|
||||
Reference in New Issue
Block a user