[U-Boot] [PATCH 1/2] Move uninitialized_var() macro from ubi_uboot.h to compiler.h

Wolfgang Denk wd at denx.de
Tue Sep 1 21:27:37 CEST 2009


Dear Anton Vorontsov,

In message <20090901182518.GA17903 at oksana.dev.rtsoft.ru> you wrote:
>
> We can fix the warnings by assigning some value to a variable
> at declaration, but the advantage of 'x = x' trick is that it
> doesn't generate any code.

Argh... what a clev^H^H^H^Hdirty trick.

Thanks for the explanation.

However, in this case it seems to make sense to me to explicitly
initialize the return code with zero.

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
A man either lives life as it happens to him, meets  it  head-on  and
licks it, or he turns his back on it and starts to wither away.
	-- Dr. Boyce, "The Menagerie" ("The Cage"), stardate unknown


More information about the U-Boot mailing list