Skip to contentSkip to conversation

video: fix Coverity missing break issue

PATCH New Anatolij Gustschin 2 participants 3 messages Jan 6, 2020 – Jan 18, 2020 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: fix Coverity missing break issue

Fix:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

CID 280902: Control flow issues (MISSING_BREAK) The case for value "VIDEO_BPP32" is not terminated by a 'break' statement.

---
 drivers/video/vidconsole-uclass.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/video/vidconsole-uclass.c +2 -0
index 75c7e25095..6c0daa1ee5 100644
@@ -144,12 +144,14 @@ u32 vid_console_color(struct video_priv *priv, unsigned int idx)
 			       ((colors[idx].g >> 2) <<  5) |
 			       ((colors[idx].b >> 3) <<  0);
 		}
+		break;
 	case VIDEO_BPP32:
 		if (CONFIG_IS_ENABLED(VIDEO_BPP32)) {
 			return (colors[idx].r << 16) |
 			       (colors[idx].g <<  8) |
 			       (colors[idx].b <<  0);
 		}
+		break;
 	default:
 		/*
 		 * For unknown bit arrangements just support
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 video: fix Coverity missing break issue

Quoted 6 lines · Anatolij Gustschin

Fix:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

CID 280902: Control flow issues (MISSING_BREAK) The case for value "VIDEO_BPP32" is not terminated by a 'break' statement.

Quoted 6 lines
---
 drivers/video/vidconsole-uclass.c | 2 ++
 1 file changed, 2 insertions(+)
#2 lore raw

PATCH 1/1 video: fix Coverity missing break issue

In reply to Anatolij Gustschin
Quoted 10 lines · On Mon, 6 Jan 2020 23:00:38 +0100 Anatolij Gustschin agust at denx.de wrote:

Fix:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

CID 280902: Control flow issues (MISSING_BREAK) The case for value "VIDEO_BPP32" is not terminated by a 'break' statement.

---
 drivers/video/vidconsole-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

Applied to u-boot-video/master, thanks!

--
Anatolij