try to fix compiling with gcc & clang

This commit is contained in:
Simon Goldschmidt 2018-06-14 15:01:57 +02:00
parent 944f286d87
commit e61b925709
2 changed files with 2 additions and 2 deletions

View File

@ -233,7 +233,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
#define IP4MAPPED_HEADER "::FFFF:" #define IP4MAPPED_HEADER "::FFFF:"
char *buf_ip4 = buf + sizeof(IP4MAPPED_HEADER) - 1; char *buf_ip4 = buf + sizeof(IP4MAPPED_HEADER) - 1;
int buflen_ip4 = buflen - sizeof(IP4MAPPED_HEADER) + 1; int buflen_ip4 = buflen - sizeof(IP4MAPPED_HEADER) + 1;
if (buflen < sizeof(IP4MAPPED_HEADER)) { if (buflen < (int)sizeof(IP4MAPPED_HEADER)) {
return NULL; return NULL;
} }
memcpy(buf, IP4MAPPED_HEADER, sizeof(IP4MAPPED_HEADER)); memcpy(buf, IP4MAPPED_HEADER, sizeof(IP4MAPPED_HEADER));

View File

@ -149,7 +149,7 @@ START_TEST(test_udp_new_remove)
} }
END_TEST END_TEST
void test_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, static void test_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p,
const ip_addr_t *addr, u16_t port) const ip_addr_t *addr, u16_t port)
{ {
struct test_udp_rxdata *ctr = (struct test_udp_rxdata *)arg; struct test_udp_rxdata *ctr = (struct test_udp_rxdata *)arg;