History

kdb: kdb_support: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced the code comments with a proper "fall through" annotation, which is what GCC is expecting to find.

Gustavo A. R. Silva committed 8 years ago

Commit 646558f1 parent 01cb3731 file · +3 −3Browse files

Showing the changes to kernel/debug (1 of 1 file). Show all

Unified · Split

kernel/debug/kdb/kdb_support.c+3−3
@@ -432,7 +432,7 @@ int kdb_getphysword(unsigned long *word, unsigned long addr, size_t size) · 431 unmodified lines
432 *word = w8;432 *word = w8;
433 break;433 break;
434 }434 }
435 /* drop through */435 /* fall through */
436 default:436 default:
437 diag = KDB_BADWIDTH;437 diag = KDB_BADWIDTH;
438 kdb_printf("kdb_getphysword: bad width %ld\n", (long) size);438 kdb_printf("kdb_getphysword: bad width %ld\n", (long) size);
@@ -481,7 +481,7 @@ int kdb_getword(unsigned long *word, unsigned long addr, size_t size) · 42 unmodified lines
481 *word = w8;481 *word = w8;
482 break;482 break;
483 }483 }
484 /* drop through */484 /* fall through */
485 default:485 default:
486 diag = KDB_BADWIDTH;486 diag = KDB_BADWIDTH;
487 kdb_printf("kdb_getword: bad width %ld\n", (long) size);487 kdb_printf("kdb_getword: bad width %ld\n", (long) size);
@@ -525,7 +525,7 @@ int kdb_putword(unsigned long addr, unsigned long word, size_t size) · 37 unmodified lines
525 diag = kdb_putarea(addr, w8);525 diag = kdb_putarea(addr, w8);
526 break;526 break;
527 }527 }
528 /* drop through */528 /* fall through */
529 default:529 default:
530 diag = KDB_BADWIDTH;530 diag = KDB_BADWIDTH;
531 kdb_printf("kdb_putword: bad width %ld\n", (long) size);531 kdb_printf("kdb_putword: bad width %ld\n", (long) size);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t