[PATCH] common: console: move break; statement
Tom Rini
trini at konsulko.com
Tue Mar 25 19:40:51 CET 2025
On Tue, Mar 25, 2025 at 05:47:44PM +0000, Andre Przywara wrote:
> In console_setfile(), there is some #ifdef'ed code, updating monitor
> functions for a U-Boot proper build. This is called inside a switch/case
> statement, but the closing "break;" is inside the #ifdef section.
> This doesn't look right: we should not fall through to the error case
> for an SPL/TPL build.
>
> Move the "break" to be always effective, solving a compiler warning about
> an untagged implicit fallthrough.
>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
Looking at the whole function in context yes, I agree this is right. It
probably wasn't a problem in practice because of where / when we don't
error check or even call this function in the end.
Reviewed-by: Tom Rini <trini at konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250325/95ebf4df/attachment.sig>
More information about the U-Boot
mailing list