Skip to content

Commit

Permalink
[log] Check logging format args
Browse files Browse the repository at this point in the history
Attribute making it possible for gcc to check logging format strings
vs. arguments given got dropped at some stage.

Put __attribute__((format(printf,...))) back in.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jan 28, 2020
1 parent 4e3c8c4 commit 5942e6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_moded-log.h
Expand Up @@ -78,7 +78,7 @@ void context_leave(void *aptr);
* ------------------------------------------------------------------------- */

void log_emit_va (const char *file, const char *func, int line, int lev, const char *fmt, va_list va);
void log_emit_real (const char *file, const char *func, int line, int lev, const char *fmt, ...);
void log_emit_real (const char *file, const char *func, int line, int lev, const char *fmt, ...) __attribute__((format(printf, 5, 6)));
void log_debugf (const char *fmt, ...);
int log_get_level (void);
void log_set_level (int lev);
Expand Down

0 comments on commit 5942e6c

Please sign in to comment.