From afb21603dc514b6febf93a68cca7acf76e282963 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 14 Dec 2016 08:31:09 +0100 Subject: [PATCH] Add a check for correct implementation of LWIP_CONST_CAST() to lwip_init() --- src/core/init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/init.c b/src/core/init.c index 570d54aa..ee415a97 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -339,6 +339,11 @@ PACK_STRUCT_END void lwip_init(void) { +#ifndef LWIP_SKIP_CONST_CHECK + int a; + LWIP_UNUSED_ARG(a); + LWIP_ASSERT("LWIP_CONST_CAST not implemented correctly. Check your lwIP port.", LWIP_CONST_CAST(void*, &a) == &a); +#endif #ifndef LWIP_SKIP_PACKING_CHECK LWIP_ASSERT("Struct packing not implemented correctly. Check your lwIP port.", sizeof(struct packed_struct_test) == PACKED_STRUCT_TEST_EXPECTED_SIZE); #endif