]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib, pimd, sharpd: Various output string cleanups
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 7 Jun 2019 13:25:53 +0000 (09:25 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 7 Jun 2019 13:29:45 +0000 (09:29 -0400)
Various compilers in our CI system were complaining about various
auto-conversions.  Let's get these cleaned up a bit more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/plist.c
lib/thread.c
pimd/pim_cmd.c
sharpd/sharp_vty.c
sharpd/sharp_zebra.c

index 9957ff1f51a8244314dc006648638206efb89c01..54ea742c66c8a22522a2a38b1dfccf94e8f0c23c 100644 (file)
@@ -1009,7 +1009,7 @@ static int vty_prefix_list_uninstall(struct vty *vty, afi_t afi,
 
                if (pentry == NULL) {
                        vty_out(vty,
-                               "%% Can't find prefix-list %s with sequence number %lu\n",
+                               "%% Can't find prefix-list %s with sequence number %" PRIu64 "\n",
                                name, seqnum);
                        return CMD_WARNING_CONFIG_FAILED;
                }
index d3fb2cdf3650c688e74b3c852ebb07f8311cde0e..3879e936a14c074e15bb63cb161938fe3dde7827 100644 (file)
@@ -95,7 +95,7 @@ static void cpu_record_hash_free(void *a)
 static void vty_out_cpu_thread_history(struct vty *vty,
                                       struct cpu_thread_history *a)
 {
-       vty_out(vty, "%5zu %10zu.%03lu %9zu %8zu %9zu %8lu %9lu",
+       vty_out(vty, "%5zu %10zu.%03zu %9zu %8zu %9zu %8zu %9zu",
                a->total_active, a->cpu.total / 1000, a->cpu.total % 1000,
                a->total_calls, a->cpu.total / a->total_calls, a->cpu.max,
                a->real.total / a->total_calls, a->real.max);
index 778819145458ed231f6770c365e96ebad5fda71a..6591bdc32e94271f79cd0c86ae75d37f851433e0 100644 (file)
@@ -1536,7 +1536,7 @@ static void pim_show_interface_traffic(struct pim_instance *pim,
                        json_object_object_add(json, ifp->name, json_row);
                } else {
                        vty_out(vty,
-                               "%-16s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7lu/%-7lu \n",
+                               "%-16s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7" PRIu64 "/%-7" PRIu64 "\n",
                                ifp->name, pim_ifp->pim_ifstat_hello_recv,
                                pim_ifp->pim_ifstat_hello_sent,
                                pim_ifp->pim_ifstat_join_recv,
@@ -1629,7 +1629,7 @@ static void pim_show_interface_traffic_single(struct pim_instance *pim,
                        json_object_object_add(json, ifp->name, json_row);
                } else {
                        vty_out(vty,
-                               "%-16s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7lu/%-7lu \n",
+                               "%-16s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7" PRIu64 "/%-7" PRIu64 "\n",
                                ifp->name, pim_ifp->pim_ifstat_hello_recv,
                                pim_ifp->pim_ifstat_hello_sent,
                                pim_ifp->pim_ifstat_join_recv,
@@ -3238,9 +3238,11 @@ static void pim_show_statistics(struct pim_instance *pim, struct vty *vty,
        } else {
                vty_out(vty, "BSM Statistics :\n");
                vty_out(vty, "----------------\n");
-               vty_out(vty, "Number of Received BSMs : %ld\n", pim->bsm_rcvd);
-               vty_out(vty, "Number of Forwared BSMs : %ld\n", pim->bsm_sent);
-               vty_out(vty, "Number of Dropped BSMs  : %ld\n",
+               vty_out(vty, "Number of Received BSMs : %" PRIu64 "\n",
+                       pim->bsm_rcvd);
+               vty_out(vty, "Number of Forwared BSMs : %" PRIu64 "\n",
+                       pim->bsm_sent);
+               vty_out(vty, "Number of Dropped BSMs  : %" PRIu64 "\n",
                        pim->bsm_dropped);
        }
 
index fbcbbe3fdca7119f940b168a69e12b4c4cc4111f..cde2edcaf1faf7deff4b2564666d8ea7c5f4e055 100644 (file)
@@ -150,7 +150,7 @@ DEFPY (install_routes_data_dump,
                sg.r.total_routes,
                sg.r.installed_routes,
                sg.r.removed_routes,
-               r.tv_sec, r.tv_usec);
+               r.tv_sec, (long int)r.tv_usec);
 
        return CMD_SUCCESS;
 }
index 19c7e556ca53631dc967525ec56d0a997f4416db..744707699343323cf15e23a0ed1e4db473c4c098 100644 (file)
@@ -213,7 +213,7 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS)
                        monotime(&sg.r.t_end);
                        timersub(&sg.r.t_end, &sg.r.t_start, &r);
                        zlog_debug("Installed All Items %ld.%ld", r.tv_sec,
-                                  r.tv_usec);
+                                  (long int)r.tv_usec);
                        handle_repeated(true);
                }
                break;
@@ -229,7 +229,7 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS)
                        monotime(&sg.r.t_end);
                        timersub(&sg.r.t_end, &sg.r.t_start, &r);
                        zlog_debug("Removed all Items %ld.%ld", r.tv_sec,
-                                  r.tv_usec);
+                                  (long int)r.tv_usec);
                        handle_repeated(false);
                }
                break;