Hello Jeroen,

On 06/30/2014 08:30 PM, Jeroen Hofstee wrote:
Hello Przemyslaw.

[...]

  #include <common.h>

+void __reset_misc(void) {}
+
+void reset_misc(void)
+    __attribute((weak, alias("__reset_misc")));
+
can you please use __weak here and provide a prototype, wherever it
ends up in the end. It prevents 3 warnings and makes it type safe..


Thanks, I will add the __weak prefix there.

thanks
The prototype of this new function is in file common.h,
so this is type safe.

yup, I see, don't know how I missed that.
No problem.
I checked the compilation with options: -W and -pedantic
on two configs: trats and odroid, and there was no warnings about the
function reset_misc.

You won't see the warning with -Wall -Wpendantic, but when running make
W=1,
which adds -Wmissing-declarations. The alias version typically warns
with something
like __reset_misc has no previous declaration. That is useful at times,
since it would e.g. complain about [1].

Regards,
Jeroen

[1] http://lists.denx.de/pipermail/u-boot/2014-June/182781.html
Thanks for useful info.

Regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marc...@samsung.com
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to