X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fpackmsg.h;h=a145722df79b646e2bc2442cca42f989483f0e8f;hb=529b8fab8c21e7ae5af91d742ff202eab38e51f3;hp=7adf2f916a2ef3d873d7716b5d90edad8ecaf2dc;hpb=6086a7fc1ecdf197d3937cec5f291b83c5d68454;p=meshlink diff --git a/src/packmsg.h b/src/packmsg.h index 7adf2f91..a145722d 100644 --- a/src/packmsg.h +++ b/src/packmsg.h @@ -173,7 +173,7 @@ static inline size_t packmsg_output_size(const packmsg_output_t *buf, const uint * \return True if all read operations performed on the input buffer so far have completed successfully, * false if any error has occurred. */ -static inline bool packmsg_input_ok(const packmsg_input_t *buf) { +static inline __attribute__((__warn_unused_result__)) bool packmsg_input_ok(const packmsg_input_t *buf) { assert(buf); return packmsg_likely(buf->len >= 0); @@ -192,7 +192,7 @@ static inline bool packmsg_input_ok(const packmsg_input_t *buf) { * false if there is still data remaining in the input buffer, * or if any error has occurred. */ -static inline bool packmsg_done(const packmsg_input_t *buf) { +static inline __attribute__((__warn_unused_result__)) bool packmsg_done(const packmsg_input_t *buf) { assert(buf); return buf->len == 0;