On Fri, Jun 24, 2011 at 14:13, Simon Glass wrote:
> On Thu, Jun 23, 2011 at 10:33 PM, Wolfgang Denk wrote:
>> Finally, should the assert() not result in some termination or hang of
>> U-Boot, like assert(3) is doing?
>
> I'm happy either way so long as it prints a message. A hang is better
> than a
Hi Wolfgang,
On Thu, Jun 23, 2011 at 10:33 PM, Wolfgang Denk wrote:
> Dear Simon Glass,
...
>> +#define assert(x) \
>> + ({ if (!(x) && _DEBUG) \
>> + printf("Assertion failure '%s' %s line %d\n", \
>> + #x, __FILE__, __LINE__); })
>
> Can we please use the
Dear Simon Glass,
In message <1308870873-32540-1-git-send-email-...@chromium.org> you wrote:
> assert() is like BUG_ON() but compiles to nothing unless DEBUG is defined.
> This is useful when a condition is an error but a board reset is unlikely
> to fix it, so it is better to soldier on in hope.
Acked-by: Mike Frysinger
-mike
signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
assert() is like BUG_ON() but compiles to nothing unless DEBUG is defined.
This is useful when a condition is an error but a board reset is unlikely
to fix it, so it is better to soldier on in hope. Assertion failures should
be caught during development/test.
It turns out that assert() is defined
5 matches
Mail list logo