summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-03-03 08:51:53 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-05-30 03:27:26 +0200
commit6c4f4e6e6a00d412f2c683f0a4232389ee7235f8 (patch)
tree7dbee5d120c31c701b63ac92585aff3087caf8da /ospf6d
parent*: use long long to print time_t (diff)
downloadfrr-6c4f4e6e6a00d412f2c683f0a4232389ee7235f8.tar.xz
frr-6c4f4e6e6a00d412f2c683f0a4232389ee7235f8.zip
*: 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>
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_intra.c7
-rw-r--r--ospf6d/ospf6_lsa.c4
-rw-r--r--ospf6d/ospf6_route.c29
-rw-r--r--ospf6d/ospf6_spf.c2
4 files changed, 24 insertions, 18 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 1ecac2813..5b92212da 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -1502,7 +1502,8 @@ ospf6_brouter_debug_print (struct ospf6_route *brouter)
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,
@@ -1550,7 +1551,7 @@ ospf6_intra_brouter_calculation (struct ospf6_area *oa)
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);
}
}
@@ -1582,7 +1583,7 @@ ospf6_intra_brouter_calculation (struct ospf6_area *oa)
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 317e33ba7..3f008d3d9 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -493,8 +493,8 @@ ospf6_lsa_show_internal (struct vty *vty, struct ospf6_lsa *lsa)
vty_out (vty, "Flag: %x %s", lsa->flag, VNL);
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: %p, Refresh: %p %s",
- lsa->expire, lsa->refresh, VNL);
+ vty_out (vty, "Threads: Expire: 0x%p, Refresh: 0x%p %s",
+ (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 86c908bb3..d174cfbb9 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -597,7 +597,7 @@ ospf6_route_add (struct ospf6_route *route,
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);
@@ -631,7 +631,8 @@ ospf6_route_add (struct ospf6_route *route,
{
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));
@@ -645,7 +646,8 @@ ospf6_route_add (struct ospf6_route *route,
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));
@@ -686,7 +688,8 @@ ospf6_route_add (struct ospf6_route *route,
{
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));
@@ -711,7 +714,8 @@ ospf6_route_add (struct ospf6_route *route,
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;
@@ -733,7 +737,7 @@ ospf6_route_add (struct ospf6_route *route,
/* 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));
@@ -812,7 +816,8 @@ ospf6_route_remove (struct ospf6_route *route,
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);
@@ -884,8 +889,8 @@ ospf6_route_head (struct ospf6_route_table *table)
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;
}
@@ -897,8 +902,8 @@ ospf6_route_next (struct ospf6_route *route)
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)
@@ -1099,7 +1104,7 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route)
(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 7dc4801a8..5b77bf00a 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -689,7 +689,7 @@ ospf6_spf_schedule (struct ospf6 *ospf6, unsigned int reason)
{
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;
}