engines/http.c: add fallthrough annotation to _curl_trace
authorRebecca Cran <rebecca@bsdio.com>
Sat, 16 Oct 2021 06:17:38 +0000 (00:17 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 16 Oct 2021 11:57:00 +0000 (05:57 -0600)
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>
Link: https://lore.kernel.org/r/20211016061738.76654-1-rebecca@bsdio.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/http.c

index 7a61b132b92bd72b94ebdc9915e311235b53fc56..35c44871da636b79f77545c078ff5ca3da1a8d8f 100644 (file)
@@ -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;