From efa2cf0cb6c81308113a24fdbbb0ba64e99d294f Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Wed, 26 Oct 2022 20:58:36 -0700 Subject: [PATCH] Replace fallthrough comments with __fallthrough__ Defined in config.h --- src/common.cpp | 2 +- src/expand.cpp | 2 +- src/parse_util.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common.cpp b/src/common.cpp index c9f7d40c6..28718bb63 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -1071,7 +1071,7 @@ static wcstring escape_string_pcre2(const wcstring &in) { case L'-': case L']': out.push_back('\\'); - /* FALLTHROUGH */ + __fallthrough__ default: out.push_back(c); } diff --git a/src/expand.cpp b/src/expand.cpp index 88f745958..7a2a0fb7e 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -947,7 +947,7 @@ expand_result_t expander_t::stage_cmdsubst(wcstring input, completion_receiver_t return expand_result_t::ok; case 1: append_cmdsub_error(errors, start, end, L"command substitutions not allowed here"); - /* intentionally falls through */ + __fallthrough__ case -1: default: return expand_result_t::make_error(STATUS_EXPAND_ERROR); diff --git a/src/parse_util.cpp b/src/parse_util.cpp index ba503eb73..f29c9f857 100644 --- a/src/parse_util.cpp +++ b/src/parse_util.cpp @@ -377,8 +377,8 @@ static void job_or_process_extent(bool process, const wchar_t *buff, size_t curs if (!process) { break; } + __fallthrough__ } - /* FALLTHROUGH */ case token_type_t::end: case token_type_t::background: case token_type_t::andand: