lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] LWIP_ERROR when LWIP_SDK_DEBUG is not defined


From: David Burkhardt
Subject: [lwip-users] LWIP_ERROR when LWIP_SDK_DEBUG is not defined
Date: Tue, 10 Nov 2015 15:23:27 -0700

Hello,

I searched the lwip-users archive for hits on LWIP_ERROR. Found several but didn't see one that addresses this particular aspect (sorry if I missed it).

We are using 1.4.1 RC 0 (dev release). We compile without LWIP_SDK_DEBUG due to small memory resources. Yet it seems LWIP_ERROR is used in several places where execution of the handler might be helpful or important to code operation.

Would it be appropriate to update the definition in src/include/lwip/debug.h from :

#ifdef LWIP_SDK_DEBUG
/** if "_expression_" isn't true, then print "message" and execute "handler" _expression_ */
#define LWIP_ERROR(message, _expression_, handler) do { if (!(_expression_)) { \
  LWIP_PLATFORM_ASSERT(message); handler;}} while(0)
#else
#define LWIP_ERROR(...)
#endif
to :
#ifdef LWIP_SDK_DEBUG
/** if "_expression_" isn't true, then print "message" and execute "handler" _expression_ */
#define LWIP_ERROR(message, _expression_, handler) do { if (!(_expression_)) { \
  LWIP_PLATFORM_ASSERT(message); handler;}} while(0)
#else
/** if "_expression_" isn't true, then execute "handler" _expression_ */
#define
LWIP_ERROR(message, _expression_, handler) do { if (!(_expression_)) { \ handler;}} while(0) #endif

Thank you.

Regards,
David

reply via email to

[Prev in Thread] Current Thread [Next in Thread]