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:
Oliver Hartkopp
2026-10-14 19:25:06 +02:00
parent 8355b57133
commit f9086772a1
+2 -1
View File
@@ -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);