From 3b37fc20f2bd5edb2520a3f42ecef0c519e027b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 7 Jun 2023 10:54:30 +0200 Subject: [PATCH] treewide: fix -Wold-style-* --- daemon/io.c | 2 +- daemon/udp_queue.c | 5 +++-- utils/cache_gc/main.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/daemon/io.c b/daemon/io.c index 48bfed301..27119adbf 100644 --- a/daemon/io.c +++ b/daemon/io.c @@ -893,7 +893,7 @@ void io_tty_alloc(uv_handle_t *handle, size_t suggested, uv_buf_t *buf) buf->base = malloc(suggested); } -struct io_stream_data *io_tty_alloc_data() { +struct io_stream_data *io_tty_alloc_data(void) { knot_mm_t *pool = mm_ctx_mempool2(MM_DEFAULT_BLKSIZE); if (!pool) { return NULL; diff --git a/daemon/udp_queue.c b/daemon/udp_queue.c index b8b7a50ad..1f8ff39ec 100644 --- a/daemon/udp_queue.c +++ b/daemon/udp_queue.c @@ -57,7 +57,7 @@ static udp_queue_t * udp_queue_create(void) } /** Global state for udp_queue_*. Note: we never free the pointed-to memory. */ -struct { +struct state { /** Singleton map: fd -> udp_queue_t, as a simple array of pointers. */ udp_queue_t **udp_queues; int udp_queues_len; @@ -66,7 +66,8 @@ struct { array_t(int) waiting_fds; uv_check_t check_handle; -} static state = {0}; +}; +static struct state state = {0}; /** Empty the given queue. The queue is assumed to exist (but may be empty). */ static void udp_queue_send(int fd) diff --git a/utils/cache_gc/main.c b/utils/cache_gc/main.c index db4f0bd8c..5adf19f06 100644 --- a/utils/cache_gc/main.c +++ b/utils/cache_gc/main.c @@ -12,7 +12,7 @@ #include "kresconfig.h" #include "kr_cache_gc.h" -volatile static int killed = 0; +static volatile int killed = 0; static void got_killed(int signum) { -- 2.47.3