diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-21 01:29:21 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-21 01:59:22 -0500 |
commit | f0e2dc75ce0385bb187b1788ba353daa1598f47a (patch) | |
tree | 9c0945f81954c8fc305d1bdeb68138167e74bac6 | |
parent | 639bab3ca6e91fe7affbe8c231bb2f7f159abf1c (diff) | |
download | gdb-f0e2dc75ce0385bb187b1788ba353daa1598f47a.zip gdb-f0e2dc75ce0385bb187b1788ba353daa1598f47a.tar.gz gdb-f0e2dc75ce0385bb187b1788ba353daa1598f47a.tar.bz2 |
sim: bfin: fix -Wimplicit-fallthrough warnings
Add the attribute to places where we want to fall thru.
-rw-r--r-- | sim/bfin/dv-bfin_dma.c | 1 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_twi.c | 1 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_uart2.c | 1 | ||||
-rw-r--r-- | sim/bfin/interp.c | 2 |
4 files changed, 5 insertions, 0 deletions
diff --git a/sim/bfin/dv-bfin_dma.c b/sim/bfin/dv-bfin_dma.c index a338470..4d2b95d 100644 --- a/sim/bfin/dv-bfin_dma.c +++ b/sim/bfin/dv-bfin_dma.c @@ -173,6 +173,7 @@ bfin_dma_process_desc (struct hw *me, struct bfin_dma *dma) dma->ndph = _flows[1]; --ndsize; ++flows; + ATTRIBUTE_FALLTHROUGH; case DMAFLOW_SMALL: dma->ndpl = _flows[0]; --ndsize; diff --git a/sim/bfin/dv-bfin_twi.c b/sim/bfin/dv-bfin_twi.c index 0ea224c..5a25320 100644 --- a/sim/bfin/dv-bfin_twi.c +++ b/sim/bfin/dv-bfin_twi.c @@ -118,6 +118,7 @@ bfin_twi_io_write_buffer (struct hw *me, const void *source, int space, break; case mmr_offset(xmt_data8): value &= 0xff; + ATTRIBUTE_FALLTHROUGH; case mmr_offset(xmt_data16): twi->xmt_fifo = value; break; diff --git a/sim/bfin/dv-bfin_uart2.c b/sim/bfin/dv-bfin_uart2.c index 0b55a30..5c8a506 100644 --- a/sim/bfin/dv-bfin_uart2.c +++ b/sim/bfin/dv-bfin_uart2.c @@ -158,6 +158,7 @@ bfin_uart_io_read_buffer (struct hw *me, void *dest, case mmr_offset(lsr): uart->lsr &= ~(DR | THRE | TEMT); uart->lsr |= bfin_uart_get_status (me); + ATTRIBUTE_FALLTHROUGH; case mmr_offset(thr): case mmr_offset(msr): case mmr_offset(dll): diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index df1d1b3f..bb0b83c 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -396,12 +396,14 @@ bfin_syscall (SIM_CPU *cpu) goto sys_finish; case CB_SYS_setuid: sc.arg1 &= 0xffff; + ATTRIBUTE_FALLTHROUGH; case CB_SYS_setuid32: tbuf += sprintf (tbuf, "setuid(%u)", args[0]); sc.result = setuid (sc.arg1); goto sys_finish; case CB_SYS_setgid: sc.arg1 &= 0xffff; + ATTRIBUTE_FALLTHROUGH; case CB_SYS_setgid32: tbuf += sprintf (tbuf, "setgid(%u)", args[0]); sc.result = setgid (sc.arg1); |