summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_lsa.c
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 /ospfd/ospf_lsa.c
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 'ospfd/ospf_lsa.c')
-rw-r--r--ospfd/ospf_lsa.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index b2c738f14..62c455e77 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -259,7 +259,7 @@ ospf_lsa_dup (struct ospf_lsa *lsa)
new->refresh_list = -1;
if (IS_DEBUG_OSPF (lsa, LSA))
- zlog_debug ("LSA: duplicated %p (new: %p)", lsa, new);
+ zlog_debug ("LSA: duplicated %p (new: %p)", (void *)lsa, (void *)new);
return new;
}
@@ -271,7 +271,7 @@ ospf_lsa_free (struct ospf_lsa *lsa)
assert (lsa->lock == 0);
if (IS_DEBUG_OSPF (lsa, LSA))
- zlog_debug ("LSA: freed %p", lsa);
+ zlog_debug ("LSA: freed %p", (void *)lsa);
/* Delete LSA data. */
if (lsa->data != NULL)
@@ -347,7 +347,7 @@ ospf_lsa_data_free (struct lsa_header *lsah)
{
if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("LSA[Type%d:%s]: data freed %p",
- lsah->type, inet_ntoa (lsah->id), lsah);
+ lsah->type, inet_ntoa (lsah->id), (void *)lsah);
XFREE (MTYPE_OSPF_LSA_DATA, lsah);
}
@@ -914,7 +914,7 @@ ospf_router_lsa_originate (struct ospf_area *area)
if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
{
zlog_debug ("LSA[Type%d:%s]: Originate router-LSA %p",
- new->data->type, inet_ntoa (new->data->id), new);
+ new->data->type, inet_ntoa (new->data->id), (void *)new);
ospf_lsa_header_dump (new->data);
}
@@ -1149,7 +1149,7 @@ ospf_network_lsa_update (struct ospf_interface *oi)
if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
{
zlog_debug ("LSA[Type%d:%s]: Originate network-LSA %p",
- new->data->type, inet_ntoa (new->data->id), new);
+ new->data->type, inet_ntoa (new->data->id), (void *)new);
ospf_lsa_header_dump (new->data);
}
@@ -1326,7 +1326,7 @@ ospf_summary_lsa_originate (struct prefix_ipv4 *p, u_int32_t metric,
if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
{
zlog_debug ("LSA[Type%d:%s]: Originate summary-LSA %p",
- new->data->type, inet_ntoa (new->data->id), new);
+ new->data->type, inet_ntoa (new->data->id), (void *)new);
ospf_lsa_header_dump (new->data);
}
@@ -1469,7 +1469,7 @@ ospf_summary_asbr_lsa_originate (struct prefix_ipv4 *p, u_int32_t metric,
if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
{
zlog_debug ("LSA[Type%d:%s]: Originate summary-ASBR-LSA %p",
- new->data->type, inet_ntoa (new->data->id), new);
+ new->data->type, inet_ntoa (new->data->id), (void *)new);
ospf_lsa_header_dump (new->data);
}
@@ -2110,7 +2110,7 @@ ospf_external_lsa_originate (struct ospf *ospf, struct external_info *ei)
if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
{
zlog_debug ("LSA[Type%d:%s]: Originate AS-external-LSA %p",
- new->data->type, inet_ntoa (new->data->id), new);
+ new->data->type, inet_ntoa (new->data->id), (void *)new);
ospf_lsa_header_dump (new->data);
}
@@ -2316,7 +2316,8 @@ ospf_external_lsa_refresh_default (struct ospf *ospf)
if (lsa)
{
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug ("LSA[Type5:0.0.0.0]: Refresh AS-external-LSA %p", lsa);
+ zlog_debug ("LSA[Type5:0.0.0.0]: Refresh AS-external-LSA %p",
+ (void *)lsa);
ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_FORCE);
}
else
@@ -2746,7 +2747,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
{
zlog_debug ("ospf_lsa_install() Premature Aging "
"lsa 0x%p, seqnum 0x%x",
- lsa, ntohl(lsa->data->ls_seqnum));
+ (void *)lsa, ntohl(lsa->data->ls_seqnum));
ospf_lsa_header_dump (lsa->data);
}
}
@@ -2849,9 +2850,9 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
{
if (IS_DEBUG_OSPF (lsa, LSA_INSTALL))
zlog_debug ("LSA[Type%d:%s]: Install LSA 0x%p, MaxAge",
- new->data->type,
- inet_ntoa (new->data->id),
- lsa);
+ new->data->type,
+ inet_ntoa (new->data->id),
+ (void *)lsa);
ospf_lsa_maxage (ospf, lsa);
}
@@ -2938,7 +2939,7 @@ ospf_maxage_lsa_remover (struct thread *thread)
if (CHECK_FLAG (lsa->flags, OSPF_LSA_PREMATURE_AGE))
{
if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
- zlog_debug ("originating new lsa for lsa 0x%p\n", lsa);
+ zlog_debug ("originating new lsa for lsa 0x%p\n", (void *)lsa);
ospf_lsa_refresh (ospf, lsa);
}
@@ -3005,7 +3006,7 @@ ospf_lsa_maxage (struct ospf *ospf, struct ospf_lsa *lsa)
{
if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
zlog_debug ("LSA[Type%d:%s]: %p already exists on MaxAge LSA list",
- lsa->data->type, inet_ntoa (lsa->data->id), lsa);
+ lsa->data->type, inet_ntoa (lsa->data->id), (void *)lsa);
return;
}
@@ -3020,7 +3021,8 @@ ospf_lsa_maxage (struct ospf *ospf, struct ospf_lsa *lsa)
{
if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
zlog_debug ("LSA[%s]: found LSA (%p) in table for LSA %p %d",
- dump_lsa_key (lsa), rn->info, lsa, lsa_prefix.prefixlen);
+ dump_lsa_key (lsa), rn->info, (void *)lsa,
+ lsa_prefix.prefixlen);
route_unlock_node (rn);
}
else
@@ -3747,9 +3749,9 @@ ospf_refresher_register_lsa (struct ospf *ospf, struct ospf_lsa *lsa)
lsa->refresh_list = index;
if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
- zlog_debug ("LSA[Refresh:Type%d:%s]: ospf_refresher_register_lsa() "
- "setting refresh_list on lsa %p (slot %d)",
- lsa->data->type, inet_ntoa (lsa->data->id), lsa, index);
+ zlog_debug ("LSA[Refresh:Type%d:%s]: ospf_refresher_register_lsa(): "
+ "setting refresh_list on lsa %p (slod %d)",
+ lsa->data->type, inet_ntoa (lsa->data->id), (void *)lsa, index);
}
}
@@ -3820,9 +3822,9 @@ ospf_lsa_refresh_walker (struct thread *t)
{
if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
zlog_debug ("LSA[Refresh:Type%d:%s]: ospf_lsa_refresh_walker(): "
- "refresh lsa %p (slot %d)",
- lsa->data->type, inet_ntoa (lsa->data->id), lsa, i);
-
+ "refresh lsa %p (slot %d)",
+ lsa->data->type, inet_ntoa (lsa->data->id), (void *)lsa, i);
+
assert (lsa->lock > 0);
list_delete_node (refresh_list, node);
lsa->refresh_list = -1;