[U-Boot] [RESEND PATCH v3] Add assert() for debug assertions
Wolfgang Denk
wd at denx.de
Sun Oct 23 10:35:37 CEST 2011
Dear Simon Glass,
In message <CAPnjgZ1OYiqTT0Y+mWnkdh7ZZWruXy5n0atB6e4CSjuQkQcvKw at mail.gmail.com> you wrote:
>
> > Can you please #ifdef it so it doesn't get added for the non-debug
> > case, too?
>
> Well I could, but then if someone defines DEBUG in a file they will
> get a link error I think. Or are you thinking of adding a new CONFIG
> which *permits* people to use DEBUG?
I don't understand what you mean.
__assert_fail() only ever gets used (and thus needs to be compiled in)
if DEBUG is defined, right? SO why cannot you wrap the code in a
"#ifdef DEBUG" ?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There's only one kind of woman ..." "Or man, for that matter. You
either believe in yourself or you don't."
-- Kirk and Harry Mudd, "Mudd's Women", stardate 1330.1
More information about the U-Boot
mailing list