bug #26523: Compiler Warnings

This commit is contained in:
goldsimon
2010-01-23 17:48:36 +00:00
parent 426dd9bfad
commit dbcce3a4be
11 changed files with 43 additions and 34 deletions

View File

@@ -181,7 +181,7 @@ lwip_standard_chksum(void *dataptr, int len)
sum = SWAP_BYTES_IN_WORD(sum);
}
return sum;
return (u16_t)sum;
}
#endif
@@ -263,7 +263,7 @@ lwip_standard_chksum(void *dataptr, int len)
sum = SWAP_BYTES_IN_WORD(sum);
}
return sum;
return (u16_t)sum;
}
#endif

View File

@@ -155,7 +155,8 @@ ip_reass_tmr(void)
static int
ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
{
int pbufs_freed = 0;
u16_t pbufs_freed = 0;
u8_t clen;
struct pbuf *p;
struct ip_reass_helper *iprh;
@@ -175,7 +176,9 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p
/* Then, copy the original header into it. */
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
icmp_time_exceeded(p, ICMP_TE_FRAG);
pbufs_freed += pbuf_clen(p);
clen = pbuf_clen(p);
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
pbufs_freed += clen;
pbuf_free(p);
}
#endif /* LWIP_ICMP */
@@ -189,8 +192,10 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p
pcur = p;
/* get the next pointer before freeing */
p = iprh->next_pbuf;
pbufs_freed += pbuf_clen(pcur);
pbuf_free(pcur);
clen = pbuf_clen(pcur);
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
pbufs_freed += clen;
pbuf_free(pcur);
}
/* Then, unchain the struct ip_reassdata from the list and free it. */
ip_reass_dequeue_datagram(ipr, prev);