*: 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/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index db1ccda..92f68f7 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -244,7 +244,8 @@
ospf_apiserver_new_lsa_hook (struct ospf_lsa *lsa)
{
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug ("API: Put LSA(%p)[%s] into reserve, total=%ld", lsa, dump_lsa_key (lsa), lsa->lsdb->total);
+ zlog_debug ("API: Put LSA(%p)[%s] into reserve, total=%ld", (void *)lsa,
+ dump_lsa_key (lsa), lsa->lsdb->total);
return 0;
}
@@ -252,7 +253,8 @@
ospf_apiserver_del_lsa_hook (struct ospf_lsa *lsa)
{
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug ("API: Get LSA(%p)[%s] from reserve, total=%ld", lsa, dump_lsa_key (lsa), lsa->lsdb->total);
+ zlog_debug ("API: Get LSA(%p)[%s] from reserve, total=%ld", (void *)lsa,
+ dump_lsa_key (lsa), lsa->lsdb->total);
return 0;
}
@@ -395,7 +397,8 @@
listnode_delete (apiserver_list, apiserv);
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug ("API: Delete apiserv(%p), total#(%d)", apiserv, apiserver_list->count);
+ zlog_debug ("API: Delete apiserv(%p), total#(%d)",
+ (void *)apiserv, apiserver_list->count);
/* And free instance. */
XFREE (MTYPE_OSPF_APISERVER, apiserv);
@@ -755,7 +758,8 @@
#endif /* USE_ASYNC_READ */
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug ("API: New apiserv(%p), total#(%d)", apiserv, apiserver_list->count);
+ zlog_debug ("API: New apiserv(%p), total#(%d)",
+ (void *)apiserv, apiserver_list->count);
return 0;
}
@@ -944,7 +948,7 @@
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("API: Add LSA-type(%d)/Opaque-type(%d) into"
" apiserv(%p), total#(%d)",
- lsa_type, opaque_type, apiserv,
+ lsa_type, opaque_type, (void *)apiserv,
listcount (apiserv->opaque_types));
return 0;
@@ -976,7 +980,7 @@
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("API: Del LSA-type(%d)/Opaque-type(%d)"
" from apiserv(%p), total#(%d)",
- lsa_type, opaque_type, apiserv,
+ lsa_type, opaque_type, (void *)apiserv,
listcount (apiserv->opaque_types));
return 0;