All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rebecca Cran <rebecca@bsdio.com>
To: fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: Rebecca Cran <rebecca@bsdio.com>
Subject: [PATCH 1/1] engines/http.c: add fallthrough annotation to _curl_trace
Date: Sat, 16 Oct 2021 00:17:38 -0600	[thread overview]
Message-ID: <20211016061738.76654-1-rebecca@bsdio.com> (raw)

To avoid the warning from clang "warning: unannotated fall-through
between switch labels [-Wimplicit-fallthrough]" swap the "fall through"
comment with the "fallthrough;" annotation from compiler.h.

Since the second "fall through" comment isn't really a new fall-through,
remove it.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 engines/http.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/engines/http.c b/engines/http.c
index 7a61b132b92b..35c44871da63 100644
--- a/engines/http.c
+++ b/engines/http.c
@@ -297,10 +297,9 @@ static int _curl_trace(CURL *handle, curl_infotype type,
 	switch (type) {
 	case CURLINFO_TEXT:
 		fprintf(stderr, "== Info: %s", data);
-		/* fall through */
+		fallthrough;
 	default:
 	case CURLINFO_SSL_DATA_OUT:
-		/* fall through */
 	case CURLINFO_SSL_DATA_IN:
 		return 0;
 
-- 
2.31.1



             reply	other threads:[~2021-10-16  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16  6:17 Rebecca Cran [this message]
2021-10-16 11:57 ` [PATCH 1/1] engines/http.c: add fallthrough annotation to _curl_trace Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211016061738.76654-1-rebecca@bsdio.com \
    --to=rebecca@bsdio.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.