summaryrefslogtreecommitdiff
path: root/proto_icmpv6.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-08-12 21:30:01 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-08-12 21:32:37 +0200
commit22c1e59bc41a62b1911ece888acf79c7eb3e7f2f (patch)
treefb20f8584f37a0f7e4cf7a2b94b165885dd2f335 /proto_icmpv6.c
parentc880f12c31f02bf48bdd76b2a8d7acaccd7ae686 (diff)
dissector: icmpv6: Fix compiler warnings
Fix the following compiler warnings that occur when building with "-W -Wall -Wextra": proto_icmpv6.c: In function ‘dissect_icmpv6_mcast_rec’: proto_icmpv6.c:326:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c: In function ‘dissect_neighb_disc_ops_15’: proto_icmpv6.c:537:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c:542:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c: In function ‘dissect_neighb_disc_ops_16’: proto_icmpv6.c:604:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] proto_icmpv6.c: In function ‘dissect_neighb_disc_ops_17’: proto_icmpv6.c:650:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proto_icmpv6.c')
-rw-r--r--proto_icmpv6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto_icmpv6.c b/proto_icmpv6.c
index 77c89b1..ada5fdd 100644
--- a/proto_icmpv6.c
+++ b/proto_icmpv6.c
@@ -22,7 +22,7 @@
#include "pkt_buff.h"
#include "built_in.h"
-#define icmpv6_code_range_valid(code, sarr) ((code) < array_size((sarr)))
+#define icmpv6_code_range_valid(code, sarr) ((size_t) (code) < array_size((sarr)))
struct icmpv6_general_hdr {
uint8_t h_type;
@@ -539,7 +539,7 @@ static int8_t dissect_neighb_disc_ops_15(struct pkt_buff *pkt,
icmpv6_neighb_disc_ops_15_name[
icmp_neighb_disc_15->name_type - 1] : "Unknown",
icmp_neighb_disc_15->name_type);
- if (pad_len > len) {
+ if (pad_len > (size_t) len) {
tprintf("Pad Len (%zu, invalid)\n%s", pad_len,
colorize_start_full(black, red)
"Skip Option" colorize_end());