fix most sign and variable initialization warnings
Change-Id: I56e08db791152a9c95fc0d16bc75b702e403274d
diff --git a/networking/ping.c b/networking/ping.c
index d7b6fc6..f2f24e6 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -546,7 +546,7 @@
uint16_t recv_seq, int ttl)
{
const char *dupmsg = " (DUP!)";
- unsigned triptime = triptime; /* for gcc */
+ unsigned triptime = 0;
++nreceived;
@@ -586,7 +586,7 @@
int hlen;
/* discard if too short */
- if (sz < (datalen + ICMP_MINLEN))
+ if (sz < (int) (datalen + ICMP_MINLEN))
return;
/* check IP header */
@@ -601,7 +601,7 @@
uint16_t recv_seq = ntohs(icmppkt->icmp_seq);
uint32_t *tp = NULL;
- if (sz >= ICMP_MINLEN + sizeof(uint32_t))
+ if (sz >= (int) (ICMP_MINLEN + sizeof(uint32_t)))
tp = (uint32_t *) icmppkt->icmp_data;
unpack_tail(sz, tp,
inet_ntoa(*(struct in_addr *) &from->sin_addr.s_addr),