mirror of
https://github.com/linux-can/can-utils.git
synced 2026-11-04 07:21:13 +01:00
isobusfs: add printf format attribute to isobusfs_log()
All pr_*() log macros use isobusfs_log() which was declared without a format attribute. Therefore the compiler did not check the format strings against the provided arguments. Add __attribute__((format(printf, 2, 3))) to let the compiler detect mismatching format specifiers. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -322,7 +322,8 @@ typedef enum {
|
||||
} log_level_t;
|
||||
|
||||
void isobusfs_log_level_set(log_level_t level);
|
||||
void isobusfs_log(log_level_t level, const char *fmt, ...);
|
||||
void isobusfs_log(log_level_t level, const char *fmt, ...)
|
||||
__attribute__((format(printf, 2, 3)));
|
||||
void isobusfs_set_interactive(bool interactive);
|
||||
void isobusfs_print_log_buffer(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user