From ca2e89ff21794b1853f628b8d5cb0f91eb140461 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 31 Oct 2022 15:38:58 +0100 Subject: show: apply const to right part of pointer Without this -Wcast-qual complains: show.c:30:43: warning: cast from 'const void *' to 'const void **' drops const qualifier [-Wcast-qual] const struct wgpeer *a = *(const void **)first, *b = *(const void **)second; ^ show.c:30:71: warning: cast from 'const void *' to 'const void **' drops const qualifier [-Wcast-qual] const struct wgpeer *a = *(const void **)first, *b = *(const void **)second; Signed-off-by: Jason A. Donenfeld --- src/show.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/show.c') diff --git a/src/show.c b/src/show.c index a61a06e..3fd3d9e 100644 --- a/src/show.c +++ b/src/show.c @@ -27,7 +27,7 @@ static int peer_cmp(const void *first, const void *second) { time_t diff; - const struct wgpeer *a = *(const void **)first, *b = *(const void **)second; + const struct wgpeer *a = *(void *const *)first, *b = *(void *const *)second; if (!a->last_handshake_time.tv_sec && !a->last_handshake_time.tv_nsec && (b->last_handshake_time.tv_sec || b->last_handshake_time.tv_nsec)) return 1; -- cgit v1.2.3-59-g8ed1b