Merge pull request #3162 from geky/nsapi-warning-cleanup

lwip/nsapi - Clean up warnings in network code
pull/3184/head
Sam Grove 2016-11-01 14:15:08 -05:00 committed by GitHub
commit 2a3f4eda19
3 changed files with 9 additions and 1 deletions

View File

@ -54,7 +54,12 @@ typedef uintptr_t mem_ptr_t;
#define SZT_F "uz"
/* ARM/LPC17xx is little endian only */
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
#ifdef BYTE_ORDER
#undef BYTE_ORDER
#endif
#define BYTE_ORDER LITTLE_ENDIAN
#endif
/* Use LWIP error codes */
#define LWIP_PROVIDE_ERRNO
@ -92,7 +97,7 @@ typedef uintptr_t mem_ptr_t;
#define LWIP_CHKSUM_ALGORITHM 0
void* thumb2_memcpy(void* pDest, const void* pSource, size_t length);
u16_t thumb2_checksum(void* pData, int length);
u16_t thumb2_checksum(const void* pData, int length);
#else
/* Used with IP headers only */
#define LWIP_CHKSUM_ALGORITHM 1

View File

@ -1179,6 +1179,7 @@ pbuf_coalesce(struct pbuf *p, pbuf_layer layer)
return p;
}
err = pbuf_copy(q, p);
LWIP_UNUSED_ARG(err);
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
pbuf_free(p);
return q;

View File

@ -290,6 +290,8 @@ bool operator==(const SocketAddress &a, const SocketAddress &b)
} else if (a._addr.version == NSAPI_IPv6) {
return memcmp(a._addr.bytes, b._addr.bytes, NSAPI_IPv6_BYTES) == 0;
}
MBED_UNREACHABLE;
}
bool operator!=(const SocketAddress &a, const SocketAddress &b)