*: use void * for printing pointers
On higher warning levels, compilers expect %p printf arguments to be
void *. Since format string / argument warnings can be useful
otherwise, let's get rid of this noise by sprinkling casts to void *
over printf calls.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 9e6b33e..3092773 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -374,7 +374,7 @@
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_debug ("%s %p: route add %p: %s", ospf6_route_table_name (table),
- table, route, buf);
+ (void *)table, (void *)route, buf);
else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
zlog_debug ("%s: route add: %s", ospf6_route_table_name (table), buf);
@@ -408,7 +408,8 @@
{
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_debug ("%s %p: route add %p: needless update of %p",
- ospf6_route_table_name (table), table, route, old);
+ ospf6_route_table_name (table),
+ (void *)table, (void *)route, (void *)old);
else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
zlog_debug ("%s: route add: needless update",
ospf6_route_table_name (table));
@@ -422,7 +423,8 @@
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_debug ("%s %p: route add %p: update of %p",
- ospf6_route_table_name (table), table, route, old);
+ ospf6_route_table_name (table),
+ (void *)table, (void *)route, (void *)old);
else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
zlog_debug ("%s: route add: update",
ospf6_route_table_name (table));
@@ -463,7 +465,8 @@
{
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_debug ("%s %p: route add %p: another path: prev %p, next %p",
- ospf6_route_table_name (table), table, route, prev, next);
+ ospf6_route_table_name (table),
+ (void *)table, (void *)route, (void *)prev, (void *)next);
else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
zlog_debug ("%s: route add: another path found",
ospf6_route_table_name (table));
@@ -488,7 +491,8 @@
SET_FLAG (route->flag, OSPF6_ROUTE_BEST);
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_info ("%s %p: route add %p: replacing previous best: %p",
- ospf6_route_table_name (table), table, route, next);
+ ospf6_route_table_name (table),
+ (void *)table, (void *)route, (void *)next);
}
route->installed = now;
@@ -510,7 +514,7 @@
/* Else, this is the brand new route regarding to the prefix */
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_debug ("%s %p: route add %p: brand new route",
- ospf6_route_table_name (table), table, route);
+ ospf6_route_table_name (table), (void *)table, (void *)route);
else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
zlog_debug ("%s: route add: brand new route",
ospf6_route_table_name (table));
@@ -589,7 +593,8 @@
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_debug ("%s %p: route remove %p: %s",
- ospf6_route_table_name (table), table, route, buf);
+ ospf6_route_table_name (table),
+ (void *)table, (void *)route, buf);
else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
zlog_debug ("%s: route remove: %s", ospf6_route_table_name (table), buf);
@@ -661,8 +666,8 @@
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_info ("%s %p: route head: %p<-[%p]->%p",
- ospf6_route_table_name (table), table,
- route->prev, route, route->next);
+ ospf6_route_table_name (table), (void *)table,
+ (void *)route->prev, (void *)route, (void *)route->next);
return route;
}
@@ -674,8 +679,8 @@
if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
zlog_info ("%s %p: route next: %p<-[%p]->%p",
- ospf6_route_table_name (route->table), route->table,
- route->prev, route, route->next);
+ ospf6_route_table_name (route->table), (void *)route->table,
+ (void *)route->prev, (void *)route, (void *)route->next);
ospf6_route_unlock (route);
if (next)
@@ -874,7 +879,7 @@
(CHECK_FLAG (route->flag, OSPF6_ROUTE_CHANGE) ? "C" : "-"),
VNL);
vty_out (vty, "Memory: prev: %p this: %p next: %p%s",
- route->prev, route, route->next, VNL);
+ (void *)route->prev, (void *)route, (void *)route->next, VNL);
/* Path section */