[PATCH] fdt_support: fix fdt_copy_fixed_partitions function()

Dan Carpenter dan.carpenter at linaro.org
Mon Mar 11 12:37:41 CET 2024


On Fri, Mar 08, 2024 at 02:34:04PM +0100, Patrice Chotard wrote:
> Move variable declaration at the beginning of the function.
> 

The problem, presumably, is that when declarations are in the middle of
a block then it triggers a GCC warning.  "declarations after code" or
whatever...  The commit message is not really clear.

And when I built this file I don't get a warning.  Is there a specific
config required to trigger the warning?

Btw, the Linux kernel recently silenced this warning because it doesn't
work well with the cleanup.h code...  It will be interesting to see if
people abandon this style guideline.

regards,
dan carpenter

> Fixes: 163c5f60ebb4 ("fdt_support: add fdt_copy_fixed_partitions function")
> 
> Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
> ---



More information about the U-Boot mailing list