diff --git a/cpukit/dev/can/ctucanfd/ctucanfd.c b/cpukit/dev/can/ctucanfd/ctucanfd.c index aa24c063a6..23d4b786c5 100644 --- a/cpukit/dev/can/ctucanfd/ctucanfd.c +++ b/cpukit/dev/can/ctucanfd/ctucanfd.c @@ -1076,6 +1076,7 @@ static void ctucanfd_handle_txtb_done( ctucanfd_txb_free( internal, txb_order_idx ); break; } + RTEMS_FALL_THROUGH(); case TXT_ERR: #ifdef CTUCANFD_DEBUG printk("CTUCANFD TXT_ERR\n"); diff --git a/cpukit/libdebugger/rtems-debugger-microblaze.c b/cpukit/libdebugger/rtems-debugger-microblaze.c index 377a731664..71b11dd9f6 100644 --- a/cpukit/libdebugger/rtems-debugger-microblaze.c +++ b/cpukit/libdebugger/rtems-debugger-microblaze.c @@ -1338,6 +1338,7 @@ int rtems_debugger_target_exception_to_signal( CPU_Exception_frame *frame ) return RTEMS_DEBUGGER_SIGNAL_TRAP; } + RTEMS_FALL_THROUGH(); default: return RTEMS_DEBUGGER_SIGNAL_ILL; } diff --git a/cpukit/libdebugger/rtems-debugger-target.c b/cpukit/libdebugger/rtems-debugger-target.c index edf7e99835..ae37a18c97 100644 --- a/cpukit/libdebugger/rtems-debugger-target.c +++ b/cpukit/libdebugger/rtems-debugger-target.c @@ -231,10 +231,13 @@ rtems_debugger_target_swbreak_control(bool insert, uintptr_t addr, DB_UINT kind) switch (target->breakpoint_size) { case 4: loc[3] = swbreaks[i].contents[3]; + RTEMS_FALL_THROUGH(); case 3: loc[2] = swbreaks[i].contents[2]; + RTEMS_FALL_THROUGH(); case 2: loc[1] = swbreaks[i].contents[1]; + RTEMS_FALL_THROUGH(); case 1: loc[0] = swbreaks[i].contents[0]; break; @@ -269,10 +272,13 @@ rtems_debugger_target_swbreak_control(bool insert, uintptr_t addr, DB_UINT kind) switch (target->breakpoint_size) { case 4: contents[3] = loc[3]; + RTEMS_FALL_THROUGH(); case 3: contents[2] = loc[2]; + RTEMS_FALL_THROUGH(); case 2: contents[1] = loc[1]; + RTEMS_FALL_THROUGH(); case 1: contents[0] = loc[0]; break; @@ -315,10 +321,13 @@ rtems_debugger_target_swbreak_insert(void) switch (target->breakpoint_size) { case 4: loc[3] = target->breakpoint[3]; + RTEMS_FALL_THROUGH(); case 3: loc[2] = target->breakpoint[2]; + RTEMS_FALL_THROUGH(); case 2: loc[1] = target->breakpoint[1]; + RTEMS_FALL_THROUGH(); case 1: loc[0] = target->breakpoint[0]; break; @@ -358,10 +367,13 @@ rtems_debugger_target_swbreak_remove(void) switch (target->breakpoint_size) { case 4: loc[3] = contents[3]; + RTEMS_FALL_THROUGH(); case 3: loc[2] = contents[2]; + RTEMS_FALL_THROUGH(); case 2: loc[1] = contents[1]; + RTEMS_FALL_THROUGH(); case 1: loc[0] = contents[0]; break; diff --git a/cpukit/libdl/rtl-mdreloc-arm.c b/cpukit/libdl/rtl-mdreloc-arm.c index 221ac4014d..1ca0af34e1 100644 --- a/cpukit/libdl/rtl-mdreloc-arm.c +++ b/cpukit/libdl/rtl-mdreloc-arm.c @@ -633,6 +633,7 @@ rtems_rtl_elf_reloc_rel (rtems_rtl_obj* obj, case R_TYPE(TLS_LE12): case R_TYPE(TLS_IE12GP): printf("TSL relocations not supported\n"); + RTEMS_FALL_THROUGH(); default: printf ("rtl: reloc unknown: sym = %" PRIu32 ", type = %" PRIu32 ", offset = %p", diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c index d64c367a88..4d323c48e2 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c @@ -37,6 +37,7 @@ #include "config.h" #endif +#include #include #ifdef __rtems__ @@ -342,17 +343,17 @@ rtems_rfs_dir_hash (const void *key, size_t length) /*-------------------------------- last block: affect all 32 bits of (c) */ switch(length) /* all the case statements fall through */ { - case 12: c+=((uint32_t)k[11])<<24; - case 11: c+=((uint32_t)k[10])<<16; - case 10: c+=((uint32_t)k[9])<<8; - case 9 : c+=k[8]; - case 8 : b+=((uint32_t)k[7])<<24; - case 7 : b+=((uint32_t)k[6])<<16; - case 6 : b+=((uint32_t)k[5])<<8; - case 5 : b+=k[4]; - case 4 : a+=((uint32_t)k[3])<<24; - case 3 : a+=((uint32_t)k[2])<<16; - case 2 : a+=((uint32_t)k[1])<<8; + case 12: c+=((uint32_t)k[11])<<24; RTEMS_FALL_THROUGH(); + case 11: c+=((uint32_t)k[10])<<16; RTEMS_FALL_THROUGH(); + case 10: c+=((uint32_t)k[9])<<8; RTEMS_FALL_THROUGH(); + case 9 : c+=k[8]; RTEMS_FALL_THROUGH(); + case 8 : b+=((uint32_t)k[7])<<24; RTEMS_FALL_THROUGH(); + case 7 : b+=((uint32_t)k[6])<<16; RTEMS_FALL_THROUGH(); + case 6 : b+=((uint32_t)k[5])<<8; RTEMS_FALL_THROUGH(); + case 5 : b+=k[4]; RTEMS_FALL_THROUGH(); + case 4 : a+=((uint32_t)k[3])<<24; RTEMS_FALL_THROUGH(); + case 3 : a+=((uint32_t)k[2])<<16; RTEMS_FALL_THROUGH(); + case 2 : a+=((uint32_t)k[1])<<8; RTEMS_FALL_THROUGH(); case 1 : a+=k[0]; break; case 0 : return c; diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c b/cpukit/libmisc/cpuuse/cpuusagetop.c index 943fc39037..bb998801cb 100644 --- a/cpukit/libmisc/cpuuse/cpuusagetop.c +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c @@ -238,20 +238,21 @@ task_usage(Thread_Control* thread, void* arg) { default: data->sort_order = RTEMS_TOP_SORT_CURRENT; - /* drop through */ + RTEMS_FALL_THROUGH(); case RTEMS_TOP_SORT_CURRENT: if (CPU_usage_Equal_to(¤t, &data->zero) || CPU_usage_Less_than(¤t, &data->current_usage[j])) continue; + RTEMS_FALL_THROUGH(); case RTEMS_TOP_SORT_TOTAL: if (CPU_usage_Equal_to(&usage, &data->zero) || CPU_usage_Less_than(&usage, &data->usage[j])) continue; - /* Fall through */ + RTEMS_FALL_THROUGH(); case RTEMS_TOP_SORT_REAL_PRI: if (thread->Real_priority.priority > data->tasks[j]->Real_priority.priority) continue; - /* Fall through */ + RTEMS_FALL_THROUGH(); case RTEMS_TOP_SORT_CURRENT_PRI: if ( _Thread_Get_priority( thread ) @@ -259,7 +260,7 @@ task_usage(Thread_Control* thread, void* arg) ) { continue; } - /* Fall through */ + RTEMS_FALL_THROUGH(); case RTEMS_TOP_SORT_ID: if (thread->Object.id < data->tasks[j]->Object.id) continue; diff --git a/cpukit/libmisc/shell/main_cp.c b/cpukit/libmisc/shell/main_cp.c index bbadb514b4..1a85ea947b 100644 --- a/cpukit/libmisc/shell/main_cp.c +++ b/cpukit/libmisc/shell/main_cp.c @@ -529,6 +529,9 @@ copy(rtems_shell_cp_globals* cp_globals, case S_IFSOCK: warnx("%s is a socket (not copied).", curr->fts_path); +#ifdef __rtems__ + RTEMS_FALL_THROUGH(); +#endif case S_IFIFO: if (Rflag) { if (copy_fifo(cp_globals, curr->fts_statp, !dne)) diff --git a/cpukit/libmisc/shell/main_ln.c b/cpukit/libmisc/shell/main_ln.c index 5a6b9f69d7..c1c09d3965 100644 --- a/cpukit/libmisc/shell/main_ln.c +++ b/cpukit/libmisc/shell/main_ln.c @@ -186,12 +186,15 @@ main_ln(rtems_shell_ln_globals* globals, int argc, char *argv[]) case 0: usage(globals); /* NOTREACHED */ + RTEMS_UNREACHABLE(); case 1: /* ln target */ exit(linkit(globals, argv[0], ".", 1)); /* NOTREACHED */ + RTEMS_UNREACHABLE(); case 2: /* ln target source */ exit(linkit(globals, argv[0], argv[1], 0)); /* NOTREACHED */ + RTEMS_UNREACHABLE(); } /* ln target1 target2 directory */ diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c index f3e2610ffb..7aeec815de 100644 --- a/cpukit/libmisc/shell/shell.c +++ b/cpukit/libmisc/shell/shell.c @@ -577,7 +577,7 @@ static int rtems_shell_line_editor( } up = 1; - /* drop through */ + RTEMS_FALL_THROUGH(); case 14: /* Control-N */ {