On Mon, Jan 17, 2022 at 02:54:32PM +0100, Christian Weisgerber wrote:
> usr.sbin/ospf6d: fix -Wunused-but-set-variable warnings
> 
> merge_config() sets "rchange", but doesn't use it.  Comparing the
> code to osfpd/ospfd.c makes me think that's an omission.  Either
> way it seems odd that the two code bases differ here.
> 
> rde_summary_update() is incomplete.  We can simply #ifdef out the
> unused variables.  The lack of indentation or braces following an
> "else" is not pretty.  I don't know if we want to fix that up.
>  
> M  usr.sbin/ospf6d/ospf6d.c
> M  usr.sbin/ospf6d/rde.c
> 
> diff 436bb480188bab67f704c5f9fcbcf0478db9c100 
> a992977b148f5fd9d4e3b9af9aeccac488edfa7a
> blob - b1193eaf336b9f5aa6a3b076efe4080881829152
> blob + af22bd43781a4eaa32b5454fe8fa4fc9992f0b4b
> --- usr.sbin/ospf6d/ospf6d.c
> +++ usr.sbin/ospf6d/ospf6d.c
> @@ -738,7 +738,7 @@ merge_config(struct ospfd_conf *conf, struct ospfd_con
>                                       if_start(conf, iface);
>                               }
>                       }
> -                     if (a->dirty) {
> +                     if (a->dirty || rchange) {
>                               a->dirty = 0;
>                               orig_rtr_lsa(LIST_FIRST(&a->iface_list)->area);
>                       }

This is indeed a missing bugfix but it does not really matter since area
support in ospf6d is not finished.

Fixing this is still the right thing. OK claudio@


> blob - f4a047206ec2c2e6d2550562560d5933825fb39d
> blob + 4c43bb9296fef10f6d8f9e6a63fcc76e16fe5de9
> --- usr.sbin/ospf6d/rde.c
> +++ usr.sbin/ospf6d/rde.c
> @@ -1249,8 +1249,10 @@ void
>  rde_summary_update(struct rt_node *rte, struct area *area)
>  {
>       struct vertex           *v = NULL;
> -//XXX        struct lsa              *lsa;
> +#if 0 /* XXX */
> +     struct lsa              *lsa;
>       u_int16_t                type = 0;
> +#endif
>  
>       /* first check if we actually need to announce this route */
>       if (!(rte->d_type == DT_NET || rte->flags & OSPF_RTR_E))
> @@ -1271,13 +1273,13 @@ rde_summary_update(struct rt_node *rte, struct area *a
>       /* TODO inter-area network route stuff */
>       /* TODO intra-area stuff -- condense LSA ??? */
>  
> +#if 0 /* XXX a lot todo */
>       if (rte->d_type == DT_NET) {
>               type = LSA_TYPE_INTER_A_PREFIX;
>       } else if (rte->d_type == DT_RTR) {
>               type = LSA_TYPE_INTER_A_ROUTER;
>       } else
>  
> -#if 0 /* XXX a lot todo */
>       /* update lsa but only if it was changed */
>       v = lsa_find(area, type, rte->prefix.s_addr, rde_router_id());
>       lsa = orig_sum_lsa(rte, area, type, rte->invalid);
> 

This is fine with me as well. OK claudio@

-- 
:wq Claudio

Reply via email to