* [PATCH 1/1] engines/http.c: add fallthrough annotation to _curl_trace
@ 2021-10-16 6:17 Rebecca Cran
2021-10-16 11:57 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Rebecca Cran @ 2021-10-16 6:17 UTC (permalink / raw)
To: fio, Jens Axboe; +Cc: Rebecca Cran
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] engines/http.c: add fallthrough annotation to _curl_trace
2021-10-16 6:17 [PATCH 1/1] engines/http.c: add fallthrough annotation to _curl_trace Rebecca Cran
@ 2021-10-16 11:57 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-10-16 11:57 UTC (permalink / raw)
To: fio, Rebecca Cran; +Cc: Jens Axboe
On Sat, 16 Oct 2021 00:17:38 -0600, Rebecca Cran wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] engines/http.c: add fallthrough annotation to _curl_trace
commit: d853907223ca610c85a81cfe238ffd93b97520e7
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-16 11:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16 6:17 [PATCH 1/1] engines/http.c: add fallthrough annotation to _curl_trace Rebecca Cran
2021-10-16 11:57 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).