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.przyw...@arm.com> --- Hi, this seems to be the only real bug I found after enabling -Wimplicit-fallthrough in the first phase of the CI. Please have a look to check whether I am right with this one. I have about 20 patches that add fallthrough annotations, to fix the other warnings, and will send them out once I polished them up - and after I have figured out what to do with libbzip2. Cheers, Andre common/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/console.c b/common/console.c index 863ac6aa9dc..618dbb0255f 100644 --- a/common/console.c +++ b/common/console.c @@ -208,8 +208,8 @@ static int console_setfile(int file, struct stdio_dev * dev) gd->jt->printf = printf; break; } - break; #endif + break; default: /* Invalid file ID */ error = -1; } -- 2.25.1