diff options
| author | Felix Fietkau | 2024-10-20 19:07:11 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2024-10-20 19:07:11 +0000 |
| commit | e93f6c3fc72904c0d178c9cdd57323071ef4ce12 (patch) | |
| tree | e77217120d0b0af9fef259f7bfb3a34aed5b2132 | |
| parent | 3c6265fdbd02ebd35fa3e7a58d6dfeed081a09d7 (diff) | |
main: fix format string related warnings for log/debug printf functions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | main.c | 2 | ||||
| -rw-r--r-- | netifd.h | 6 |
2 files changed, 5 insertions, 3 deletions
@@ -89,7 +89,7 @@ netifd_delete_process(struct netifd_process *proc) close(proc->log.fd.fd); } -static void +static void __attribute__((format (printf, 1, 0))) netifd_udebug_vprintf(const char *format, va_list ap) { if (!udebug_buf_valid(&udb_log)) @@ -100,10 +100,12 @@ struct netifd_process { bool log_overflow; }; -void netifd_udebug_printf(const char *format, ...); +void netifd_udebug_printf(const char *format, ...) + __attribute__((format (printf, 1, 2))); void netifd_udebug_config(struct udebug_ubus *ctx, struct blob_attr *data, bool enabled); -void netifd_log_message(int priority, const char *format, ...); +void netifd_log_message(int priority, const char *format, ...) + __attribute__((format (printf, 2, 3))); int netifd_start_process(const char **argv, char **env, struct netifd_process *proc); void netifd_kill_process(struct netifd_process *proc); |