Re: git: 685866bbe13d - main - routing: fix build without ROUTE_MPATH
Date: Thu, 11 Aug 2022 09:27:26 UTC
On Wed, 10 Aug 2022 20:45:38 GMT "Alexander V. Chernikov" <melifaro@FreeBSD.org> wrote: > The branch main has been updated by melifaro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=685866bbe13da2b9c5d108036c29f07a4c7cd04f > > commit 685866bbe13da2b9c5d108036c29f07a4c7cd04f > Author: Alexander V. Chernikov <melifaro@FreeBSD.org> > AuthorDate: 2022-08-10 20:44:43 +0000 > Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> > CommitDate: 2022-08-10 20:45:22 +0000 > > routing: fix build without ROUTE_MPATH > > MFC after: 1 month > --- > sys/net/route/route_ctl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c > index 8418e8ddd1d5..34b00a0b82ce 100644 > --- a/sys/net/route/route_ctl.c > +++ b/sys/net/route/route_ctl.c > @@ -920,11 +920,11 @@ rt_delete_conditional(struct rib_head *rnh, struct rtentry *rt, > int prio, rib_filter_f_t *cb, void *cbdata, struct rib_cmd_info *rc) > { > struct nhop_object *nh = rt->rt_nhop; > - struct route_nhop_data rnd; > > #ifdef ROUTE_MPATH > if (NH_IS_NHGRP(nh)) { > struct nhgrp_object *nhg = (struct nhgrp_object *)nh; > + struct route_nhop_data rnd; > int error; > > if (cb == NULL) > I did a buildkernel and got this warning message: /usr/src/sys/net/route/route_ctl.c:787:1: warning: unused function 'add_route_flags_mpath' [-Wunused-function] add_route_flags_mpath(struct rib_head *rnh, struct rtentry *rt, ^ 1 warning generated. This is because the function is only called if ROUTE_MPATH is defined, but the forward declaration and implementation of add_route_flags_mpath are not gated with #ifdef ROUTE_MPATH. -- Gary Jennejohn