diff mbox series

[RFC,v2,66/78] hw/nvram/eeprom_at24c.c: add fallthrough pseudo-keyword

Message ID d04f2d4a754f0a9184ddf50917621f61600c142f.1697183699.git.manos.pitsidianakis@linaro.org
State New
Headers show
Series Strict disable implicit fallthrough | expand

Commit Message

Manos Pitsidianakis Oct. 13, 2023, 7:57 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/nvram/eeprom_at24c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c
index 3272068663..aa3685db33 100644
--- a/hw/nvram/eeprom_at24c.c
+++ b/hw/nvram/eeprom_at24c.c
@@ -66,28 +66,28 @@  static
 int at24c_eeprom_event(I2CSlave *s, enum i2c_event event)
 {
     EEPROMState *ee = AT24C_EE(s);
 
     switch (event) {
     case I2C_START_SEND:
     case I2C_FINISH:
         ee->haveaddr = 0;
-        /* fallthrough */
+        fallthrough;
     case I2C_START_RECV:
         DPRINTK("clear\n");
         if (ee->blk && ee->changed) {
             int ret = blk_pwrite(ee->blk, 0, ee->rsize, ee->mem, 0);
             if (ret < 0) {
                 ERR(TYPE_AT24C_EE
                         " : failed to write backing file\n");
             }
             DPRINTK("Wrote to backing file\n");
         }
         ee->changed = false;
         break;
     case I2C_NACK:
         break;
     default:
         return -1;
     }
     return 0;
 }