* \memberof packmsg_output
*
* This function checks if all operations performed on the output buffer so far
- * have all completed succesfully, and the buffer contains a valid PackMessage message.
+ * have all completed successfully, and the buffer contains a valid PackMessage message.
*
* \param buf A pointer to an output buffer iterator.
*
* \memberof packmsg_input
*
* This function checks if all operations performed on the input buffer so far
- * have all completed succesfully, and the buffer contains a valid PackMessage message.
+ * have all completed successfully, and the buffer contains a valid PackMessage message.
*
* \param buf A pointer to an input buffer iterator.
*
* \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);
* 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;
/** \brief Get a NIL from the input.
* \memberof packmsg_input
*
- * This function does not return anything, but will invalidate the input interator
- * if no NIL was succesfully consumed from the input.
+ * This function does not return anything, but will invalidate the input iterator
+ * if no NIL was successfully consumed from the input.
*
* \param buf A pointer to an input buffer iterator.
*/
*
* This function copies a string from the input another buffer provided by the application.
* The buffer must be long enough to hold the complete string plus a terminating NUL-byte.
- * If the buffer is not long enough, or another error occured,
+ * If the buffer is not long enough, or another error occurred,
* a single NUL-byte will be written to the start of the buffer (if its size is at least one byte).
*
* \param buf A pointer to an input buffer iterator.
*
* This enum describes the type of an element in a PackMessage message.
* In case of integers and floating point values, the type normally represents
- * the smallest type that can succesfully hold the value of the element;
- * i.e. an element of type PACKMSG_INT32 can only succesfully be read by
+ * the smallest type that can successfully hold the value of the element;
+ * i.e. an element of type PACKMSG_INT32 can only successfully be read by
* packmsg_get_int32() or packmsg_get_int64(). However, the converse it not true;
* for an element of type PACKMSG_INT32, there is no guarantee
* that the value is larger than would fit into an int16_t.