Acked-by: Donald Sharp <[email protected]>

On Tue, Nov 10, 2015 at 12:29 PM, Christian Franke <
[email protected]> wrote:

> These issues have been found by running buildtest.sh
> using GCC 5.2.0 and Clang 3.7.0
>
> adj->sysid and ifp->name are both arrays, therefore can
> never be NULL. The compiler recognizes this and triggers
> a warning which causes the build to fail if Werror is set.
>
> Signed-off-by: Christian Franke <[email protected]>
> ---
>  isisd/isis_adjacency.c | 6 +++---
>  pimd/pim_static.c      | 2 +-
>  ripd/ripd.c            | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
> index a485575..b8d28b3 100644
> --- a/isisd/isis_adjacency.c
> +++ b/isisd/isis_adjacency.c
> @@ -203,7 +203,7 @@ isis_adj_state_change (struct isis_adjacency *adj,
> enum isis_adj_state new_state
>        if (dyn)
>         adj_name = (const char *)dyn->name.name;
>        else
> -       adj_name = adj->sysid ? sysid_print (adj->sysid) : "unknown";
> +       adj_name = sysid_print (adj->sysid);
>
>        zlog_info ("%%ADJCHANGE: Adjacency to %s (%s) changed from %s to
> %s, %s",
>                  adj_name,
> @@ -314,8 +314,8 @@ isis_adj_print (struct isis_adjacency *adj)
>      zlog_debug ("%s", dyn->name.name);
>
>    zlog_debug ("SystemId %20s SNPA %s, level %d\nHolding Time %d",
> -             adj->sysid ? sysid_print (adj->sysid) : "unknown",
> -             snpa_print (adj->snpa), adj->level, adj->hold_time);
> +              sysid_print (adj->sysid), snpa_print (adj->snpa),
> +              adj->level, adj->hold_time);
>    if (adj->ipv4_addrs && listcount (adj->ipv4_addrs) > 0)
>      {
>        zlog_debug ("IPv4 Address(es):");
> diff --git a/pimd/pim_static.c b/pimd/pim_static.c
> index e43c59a..cbbcaaa 100644
> --- a/pimd/pim_static.c
> +++ b/pimd/pim_static.c
> @@ -42,7 +42,7 @@ static struct static_route * static_route_alloc()
>
>     s_route = XCALLOC(MTYPE_PIM_STATIC_ROUTE, sizeof(*s_route));
>     if (!s_route) {
> -     zlog_err("PIM XCALLOC(%u) failure", sizeof(*s_route));
> +     zlog_err("PIM XCALLOC(%zu) failure", sizeof(*s_route));
>       return 0;
>     }
>     return s_route;
> diff --git a/ripd/ripd.c b/ripd/ripd.c
> index b708889..870873d 100644
> --- a/ripd/ripd.c
> +++ b/ripd/ripd.c
> @@ -2574,7 +2574,7 @@ rip_update_process (int route_type)
>
>           if (IS_RIP_DEBUG_EVENT)
>             zlog_debug("SEND UPDATE to %s ifindex %d",
> -                      (ifp->name ? ifp->name : "_unknown_"),
> ifp->ifindex);
> +                      ifp->name, ifp->ifindex);
>
>            /* send update on each connected network */
>           for (ALL_LIST_ELEMENTS (ifp->connected, ifnode, ifnnode,
> connected))
> --
> 2.6.1
>
>
> _______________________________________________
> Quagga-dev mailing list
> [email protected]
> https://lists.quagga.net/mailman/listinfo/quagga-dev
>
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to