From: Zbigniew Jędrzejewski-Szmek Date: Wed, 25 Mar 2026 23:04:34 +0000 (+0100) Subject: timedatectl: stop using _fallthrough_ X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff2fa93ac0f158d03650a34189218981fbec42fc;p=thirdparty%2Fsystemd.git timedatectl: stop using _fallthrough_ gcc and newer clang seem to be fine with it, but clang 14, 16, 18 is unhappy: ../src/timedate/timedatectl.c:1006:25: error: fallthrough annotation does not directly precede switch label _fallthrough_; ^ _fallthrough_ doesn't seem to be used very often in option parsing, so let's remove the use for now. --- diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 75c142e84ec..7d6ca7450a6 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -995,9 +995,9 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) { /* If the user asked for a particular property, show it to them, even if empty. */ SET_FLAG(arg_print_flags, BUS_PRINT_PROPERTY_SHOW_EMPTY, true); - if (current->short_code == 'p') - break; - _fallthrough_; + if (current->short_code == 'P') + SET_FLAG(arg_print_flags, BUS_PRINT_PROPERTY_ONLY_VALUE, true); + break; OPTION_LONG("value", NULL, "When showing properties, only print the value"): SET_FLAG(arg_print_flags, BUS_PRINT_PROPERTY_ONLY_VALUE, true);