Skip to content

Commit

Permalink
rtlog: enable gcc format string checking for ubx log functions
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
  • Loading branch information
kmarkus committed Nov 6, 2019
1 parent 280d60d commit 5ea55cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions API_Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This file tracks user visible API changes.

## Unreleased

- rtlog: enable gcc format checking. This checks the provided
arguments match the given format string.

- ubx_tocarr: cmdline args added to allow overriding output file file

## v0.7.0
Expand Down
3 changes: 2 additions & 1 deletion libubx/rtlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void ubx_log_cleanup(ubx_node_info_t *ni);

/* generic, low-level logging function. blocks should prefer the
* standard ubx_* functions */
void __ubx_log(int level, ubx_node_info_t *ni, const char* src, const char* fmt, ...);
void __ubx_log(int level, ubx_node_info_t *ni, const char* src, const char* fmt, ...)
__attribute__((format(printf, 4, 5)));

#endif /* _UBX_RTLOG_H */
2 changes: 1 addition & 1 deletion std_blocks/mqueue/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static void mqueue_write(ubx_block_t *i, ubx_data_t* data)
if(ret != 0 ) {
mqi->cnt_send_err++;
if (errno != EAGAIN) {
ubx_err(i, "mq_send %s failed", i->name, strerror(errno));
ubx_err(i, "mq_send %s failed: %s", i->name, strerror(errno));
goto out;
}
}
Expand Down

0 comments on commit 5ea55cb

Please sign in to comment.