Skip to content

Commit 2a3f4ed

Browse files
authored
Merge pull request #3162 from geky/nsapi-warning-cleanup
lwip/nsapi - Clean up warnings in network code
2 parents fa314e2 + 4210537 commit 2a3f4ed

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

features/FEATURE_LWIP/lwip-interface/lwip-sys/arch/cc.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ typedef uintptr_t mem_ptr_t;
5454
#define SZT_F "uz"
5555

5656
/* ARM/LPC17xx is little endian only */
57+
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
58+
#ifdef BYTE_ORDER
59+
#undef BYTE_ORDER
60+
#endif
5761
#define BYTE_ORDER LITTLE_ENDIAN
62+
#endif
5863

5964
/* Use LWIP error codes */
6065
#define LWIP_PROVIDE_ERRNO
@@ -92,7 +97,7 @@ typedef uintptr_t mem_ptr_t;
9297
#define LWIP_CHKSUM_ALGORITHM 0
9398

9499
void* thumb2_memcpy(void* pDest, const void* pSource, size_t length);
95-
u16_t thumb2_checksum(void* pData, int length);
100+
u16_t thumb2_checksum(const void* pData, int length);
96101
#else
97102
/* Used with IP headers only */
98103
#define LWIP_CHKSUM_ALGORITHM 1

features/FEATURE_LWIP/lwip-interface/lwip/src/core/lwip_pbuf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ pbuf_coalesce(struct pbuf *p, pbuf_layer layer)
11791179
return p;
11801180
}
11811181
err = pbuf_copy(q, p);
1182+
LWIP_UNUSED_ARG(err);
11821183
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
11831184
pbuf_free(p);
11841185
return q;

features/netsocket/SocketAddress.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ bool operator==(const SocketAddress &a, const SocketAddress &b)
290290
} else if (a._addr.version == NSAPI_IPv6) {
291291
return memcmp(a._addr.bytes, b._addr.bytes, NSAPI_IPv6_BYTES) == 0;
292292
}
293+
294+
MBED_UNREACHABLE;
293295
}
294296

295297
bool operator!=(const SocketAddress &a, const SocketAddress &b)

0 commit comments

Comments
 (0)