summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Trushkin <me@dogonthesun.net>2011-12-22 18:24:19 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2012-01-02 19:13:48 +0400
commitcba1fab2d7e22921a03b8b886772daec8b5977c4 (patch)
treeb650afe06f6074434f50d6c24b5a6a5c17dc4d81
parent664711c1f4cc218073783ff6ce362093debd7b53 (diff)
ospf6d: fix compiler warning messages
* fix disagreement with C99 in zlog_debug calls Format specifier in some zlog_debug calls for size_t values was changed in order to C99 ('%u' -> '%zu'). * fix -Wsign-compare warnings Type of return value of ospf6_packet_max() was changed.
-rw-r--r--ospf6d/ospf6_message.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index aaee4d20..01d61263 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -1104,7 +1104,7 @@ ospf6_lsaseq_examin
if (length < OSPF6_LSA_HEADER_SIZE)
{
if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
- zlog_debug ("%s: undersized (%u B) trailing (#%u) LSA header",
+ zlog_debug ("%s: undersized (%zu B) trailing (#%u) LSA header",
__func__, length, counted_lsas);
return MSG_NG;
}
@@ -1136,7 +1136,7 @@ ospf6_lsaseq_examin
if (lsalen > length)
{
if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
- zlog_debug ("%s: anomaly in %s LSA #%u: declared length is %u B, buffered length is %u B",
+ zlog_debug ("%s: anomaly in %s LSA #%u: declared length is %u B, buffered length is %zu B",
__func__, ospf6_lstype_name (lsah->type), counted_lsas, lsalen, length);
return MSG_NG;
}
@@ -1707,10 +1707,11 @@ ospf6_send (struct in6_addr *src, struct in6_addr *dst,
zlog_err ("Could not send entire message");
}
-static int
+static uint32_t
ospf6_packet_max(struct ospf6_interface *oi)
{
- return oi->ifmtu - sizeof(struct ip6_hdr);
+ assert (oi->ifmtu > sizeof (struct ip6_hdr));
+ return oi->ifmtu - (sizeof (struct ip6_hdr));
}
int