diff --git a/CHANGELOG b/CHANGELOG index cb0b4ccb..1781b64a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -599,6 +599,7 @@ HISTORY 2008-03-04 Jonathan Larmour * mem.c, stats.c, mem.h: apply patch #6414 to avoid compiler errors and/or warnings on some systems where mem_size_t and size_t differ. + * pbuf.c, ppp.c: Fix warnings on some systems with mem_malloc. 2008-03-04 Kieran Mansley (contributions by others) * Numerous small compiler error/warning fixes from contributions to diff --git a/src/core/pbuf.c b/src/core/pbuf.c index c176adbe..8d935b02 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -207,7 +207,7 @@ pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) break; case PBUF_RAM: /* If pbuf is to be allocated in RAM, allocate memory for it. */ - p = mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length)); + p = (struct pbuf*)mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length)); if (p == NULL) { return NULL; } diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 9b45f543..b84ccbfa 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -400,7 +400,7 @@ pppInit(void) subnetMask = htonl(0xffffff00); - outpacket_buf[i] = mem_malloc(PPP_MRU+PPP_HDRLEN); + outpacket_buf[i] = (u_char *)mem_malloc(PPP_MRU+PPP_HDRLEN); if(!outpacket_buf[i]) { return ERR_MEM; }