git: 5e1097f83cbe - main - Adjust function definitions in route_ctl.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Jul 2022 19:25:21 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5e1097f83cbe353839888c0aad8e31bb62b8e9a4 commit 5e1097f83cbe353839888c0aad8e31bb62b8e9a4 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 18:28:25 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-26 19:25:09 +0000 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);