From 5e1097f83cbe353839888c0aad8e31bb62b8e9a4 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 26 Jul 2022 20:28:25 +0200 Subject: [PATCH] Adjust function definitions in route_ctl.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/net/route/route_ctl.c:130:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] vnet_rtzone_init() ^ void sys/net/route/route_ctl.c:139:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] vnet_rtzone_destroy() ^ void This is because vnet_rtzone_init() and vnet_rtzone_destroy() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days --- sys/net/route/route_ctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index fa0242f5bf7f..f8b6a6eb4cd0 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -127,7 +127,7 @@ VNET_DEFINE_STATIC(uma_zone_t, rtzone); SYSCTL_NODE(_net_route, OID_AUTO, debug, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); void -vnet_rtzone_init() +vnet_rtzone_init(void) { V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), @@ -136,7 +136,7 @@ vnet_rtzone_init() #ifdef VIMAGE void -vnet_rtzone_destroy() +vnet_rtzone_destroy(void) { uma_zdestroy(V_rtzone);