diff options
| author | Matteo Croce <teknoraver@meta.com> | 2025-03-27 20:49:10 +0100 |
|---|---|---|
| committer | Matteo Croce <teknoraver@meta.com> | 2025-04-07 15:09:08 +0200 |
| commit | b77025b6e78efbdd4cc36c5e65d3a8d59a805e63 (patch) | |
| tree | f959a170db497beb257ea6aedeed5208edfdce76 /misc-utils/lsblk.c | |
| parent | 1a3cbd3c0f7c84f977b624a6240d02ce741fc747 (diff) | |
| download | util-linux-b77025b6e78efbdd4cc36c5e65d3a8d59a805e63.tar.gz | |
Use the 'fallthrough' attribute
C23[1] and CPP17[2] introduced the 'fallthrough' attribute to let the
compiler know that we're intentionally falling through a case statement.
This suppress a warning with new compilers when doing an implicit fallthrough.
[1] https://en.cppreference.com/w/c/language/attributes/fallthrough
[2] https://en.cppreference.com/w/cpp/language/attributes/fallthrough
Diffstat (limited to 'misc-utils/lsblk.c')
| -rw-r--r-- | misc-utils/lsblk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index bd2621c026..9f252d079b 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -2224,7 +2224,7 @@ static void set_column_type(const struct colinfo *ci, struct libscols_column *cl /* See init_scols_filter(), it may overwrite the type */ if (!lsblk->bytes) break; - /* fallthrough */ + FALLTHROUGH; case COLTYPE_NUM: scols_column_set_json_type(cl, SCOLS_JSON_NUMBER); scols_column_set_data_type(cl, SCOLS_DATA_U64); |
