From: Guy Harris Date: Sat, 2 Jan 2021 05:08:32 +0000 (-0800) Subject: Squelch some signed vs. unsigned warnings. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/399c5ebdd0432e413ab146bd65ae01f565db1edc Squelch some signed vs. unsigned warnings. They showed up on 64-bit OpenBSD 6.6. --- diff --git a/netdissect.h b/netdissect.h index 8595287e..1f8efc80 100644 --- a/netdissect.h +++ b/netdissect.h @@ -99,7 +99,7 @@ typedef unsigned char nd_ipv6[16]; /* * Use this for MAC addresses. */ -#define MAC_ADDR_LEN 6 /* length of MAC addresses */ +#define MAC_ADDR_LEN 6U /* length of MAC addresses */ typedef unsigned char nd_mac_addr[MAC_ADDR_LEN]; /* diff --git a/print-aoe.c b/print-aoe.c index c4f3758f..0cd4299a 100644 --- a/print-aoe.c +++ b/print-aoe.c @@ -270,7 +270,7 @@ aoev1_mac_print(netdissect_options *ndo, cp += 1; len -= 1; ND_PRINT(", Dir Count: %u", dircount); - if (dircount * 8 > len) + if (dircount * 8U > len) goto invalid; /* directives */ for (i = 0; i < dircount; i++) {