[PATCH 10/18] video: annotate switch/case fall-through
Andre Przywara
andre.przywara at arm.com
Thu Mar 27 16:33:05 CET 2025
The generic DM video code uses an implicit switch/case fallthrough to
provide fallback code paths when certain colour depths are not enabled.
Add our "fallthrough;" statement-like macro to the video_fill() function
to avoid a warning when GCC's -Wimplicit-fallthrough warning option is
enabled.
Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
drivers/video/video-uclass.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index ff4f2199585..c684c994b61 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -245,6 +245,7 @@ int video_fill(struct udevice *dev, u32 colour)
*ppix++ = colour;
break;
}
+ fallthrough;
case VIDEO_BPP32:
if (CONFIG_IS_ENABLED(VIDEO_BPP32)) {
u32 *ppix = priv->fb;
@@ -254,6 +255,7 @@ int video_fill(struct udevice *dev, u32 colour)
*ppix++ = colour;
break;
}
+ fallthrough;
default:
memset(priv->fb, colour, priv->fb_size);
break;
--
2.25.1
More information about the U-Boot
mailing list