
11 Mar
2024
11 Mar
'24
12:37 p.m.
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@foss.st.com