[PATCH] fdt_support: fix fdt_copy_fixed_partitions function()
Patrice CHOTARD
patrice.chotard at foss.st.com
Tue Mar 12 11:47:06 CET 2024
On 3/11/24 12:37, Dan Carpenter wrote:
> 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.
Hi
Yes it was my intention.
During code review, i noticed this "in the middle" variable declaration and always
thought that compiler will warn about this.
>
> And when I built this file I don't get a warning. Is there a specific
> config required to trigger the warning?
I confirm, i checked also on my side and don't get any 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.
So this patch can be abandoned.
Thanks
Patrice
>
> 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