*: 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_intra.c b/ospf6d/ospf6_intra.c
index 4ad7521..1ef0b53 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -1495,7 +1495,8 @@
zlog_info ("Brouter: %s via area %s", brouter_name, area_name);
zlog_info (" memory: prev: %p this: %p next: %p parent rnode: %p",
- brouter->prev, brouter, brouter->next, brouter->rnode);
+ (void *)brouter->prev, (void *)brouter, (void *)brouter->next,
+ (void *)brouter->rnode);
zlog_info (" type: %d prefix: %s installed: %s changed: %s",
brouter->type, destination, installed, changed);
zlog_info (" lock: %d flags: %s%s%s%s", brouter->lock,
@@ -1543,7 +1544,7 @@
IS_OSPF6_DEBUG_ROUTE (MEMORY))
{
zlog_info ("%p: mark as removing: area %s brouter %s",
- brouter, oa->name, brouter_name);
+ (void *)brouter, oa->name, brouter_name);
ospf6_brouter_debug_print (brouter);
}
}
@@ -1575,7 +1576,7 @@
IS_OSPF6_DEBUG_ROUTE (MEMORY))
{
zlog_info ("%p: transfer: area %s brouter %s",
- brouter, oa->name, brouter_name);
+ (void *)brouter, oa->name, brouter_name);
ospf6_brouter_debug_print (brouter);
}
}
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index 8eeb995..b4348f4 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -494,7 +494,7 @@
vty_out (vty, "Lock: %d %s", lsa->lock, VNL);
vty_out (vty, "ReTx Count: %d%s", lsa->retrans_count, VNL);
vty_out (vty, "Threads: Expire: 0x%p, Refresh: 0x%p %s",
- lsa->expire, lsa->refresh, VNL);
+ (void *)lsa->expire, (void *)lsa->refresh, VNL);
vty_out (vty, "%s", VNL);
return;
}
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 */
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index 47a655c..88e1285 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -639,7 +639,7 @@
{
if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF (TIME))
zlog_debug ("SPF: calculation timer is already scheduled: %p",
- ospf6->t_spf_calc);
+ (void *)ospf6->t_spf_calc);
return;
}