diff mbox series

[RFC,v3,64/78] hw/mips: add fallthrough pseudo-keyword

Message ID 4e6afd01831a38c59d09f8f0483b304b7329f4aa.1697186560.git.manos.pitsidianakis@linaro.org (mailing list archive)
State New, archived
Headers show
Series Strict disable implicit fallthrough | expand

Commit Message

Manos Pitsidianakis Oct. 13, 2023, 8:46 a.m. UTC
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/mips/boston.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Philippe Mathieu-Daudé Oct. 17, 2023, 10:30 a.m. UTC | #1
On 13/10/23 10:46, Emmanouil Pitsidianakis wrote:
> In preparation of raising -Wimplicit-fallthrough to 5, replace all
> fall-through comments with the fallthrough attribute pseudo-keyword.
> 
> Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
>   hw/mips/boston.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index 4e11ff6cd6..4ca53b790a 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -173,14 +173,14 @@  static uint64_t boston_lcd_read(void *opaque, hwaddr addr,
         val |= (uint64_t)s->lcd_content[(addr + 6) & 0x7] << 48;
         val |= (uint64_t)s->lcd_content[(addr + 5) & 0x7] << 40;
         val |= (uint64_t)s->lcd_content[(addr + 4) & 0x7] << 32;
-        /* fall through */
+        fallthrough;
     case 4:
         val |= (uint64_t)s->lcd_content[(addr + 3) & 0x7] << 24;
         val |= (uint64_t)s->lcd_content[(addr + 2) & 0x7] << 16;
-        /* fall through */
+        fallthrough;
     case 2:
         val |= (uint64_t)s->lcd_content[(addr + 1) & 0x7] << 8;
-        /* fall through */
+        fallthrough;
     case 1:
         val |= (uint64_t)s->lcd_content[(addr + 0) & 0x7];
         break;
@@ -200,14 +200,14 @@  static void boston_lcd_write(void *opaque, hwaddr addr,
         s->lcd_content[(addr + 6) & 0x7] = val >> 48;
         s->lcd_content[(addr + 5) & 0x7] = val >> 40;
         s->lcd_content[(addr + 4) & 0x7] = val >> 32;
-        /* fall through */
+        fallthrough;
     case 4:
         s->lcd_content[(addr + 3) & 0x7] = val >> 24;
         s->lcd_content[(addr + 2) & 0x7] = val >> 16;
-        /* fall through */
+        fallthrough;
     case 2:
         s->lcd_content[(addr + 1) & 0x7] = val >> 8;
-        /* fall through */
+        fallthrough;
     case 1:
         s->lcd_content[(addr + 0) & 0x7] = val;
         break;