lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Question about LWIP_ERROR macro


From: Enrico Murador - Research & Development - CET
Subject: Re: [lwip-users] Question about LWIP_ERROR macro
Date: Tue, 10 May 2011 16:21:06 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

Dear Simon,

It seems to me that, once one defines LWIP_PLATFORM_ASSERT macro as "fatal", as it should be,
also when LWIP_NOASSERT is defined LWIP_ERROR remains "fatal".
This is because LWIP_NOASSERT, when defined, "nulls" only the LWIP_ASSERT macro,
but LWIP_ERROR "calls" directly LWIP_PLATFORM_ASSERT that is (and remains) defined from the custom application...

Thanks
Enrico

On 10/05/2011 15.45, Simon Goldschmidt wrote:
Enrico Murador - Research & Development - CET <address@hidden> wrote:
(maybe LWIP_ERROR could be "fatal" only if LWIP_NOASSERT is undefined...)
If LWIP_NOASSERT is defined, all ASSERTs are skipped, whereas for LWIP_ERROR, the error handler is executed. However, for very small applications (for targets which are very limited), you can redefine LWIP_ERROR do just do nothing if you are absolutely sure that the condition which is checked there cannot happen. This is not really needed too often, I guess...

Simon


reply via email to

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