|
From: | Bill Auerbach |
Subject: | [lwip-devel] LWIP_ERROR included in release builds |
Date: | Mon, 23 Mar 2009 17:03:28 -0400 |
Hello,
I just happened to view the binary output of my lwIP based firmware and noticed something that surprised me a lot.
I see several assertions in the text part of the binary. I check into the text and find out that LWIP_ERROR is including assertions in release mode! I.e., LWIP_DEBUG is not defined and LWIP_NOASSERT is defined. I find in debug.h there is no exclusion of LWIP_ERROR if LWIP_NOASSERT is defined. I think this is a bug not to do so. To me, release means release. If I didn’t catch this LWIP_ERROR check in debug mode testing, it’s my problem – if any of these checks fails, they will lock up my firmware! (Maybe if it continues it will also, I can’t say.) A workaround could be an explicit define (LWIP_CHECK_ERROR) if it’s desired to have it when LWIP_NOASSERT is defined as I feel strongly that LWIP_ERROR should not be included by default.
Is there a good reason to dispel my opinion?
Bill
[Prev in Thread] | Current Thread | [Next in Thread] |