public inbox for [email protected]
 help / color / mirror / Atom feed
From: Sedat Dilek <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] io_uring: re-issue plug based block requests that failed
Date: Sat, 6 Jun 2020 00:13:57 +0200	[thread overview]
Message-ID: <CA+icZUX7jibW9QYDy1Hykwp9cH2GGL9EzR=eDQL8UaH6SY0ASQ@mail.gmail.com> (raw)
In-Reply-To: <CA+icZUXRE+++FbchwF5Rhrj5AeRY=H2T8m07Y8CV5bhu_s5OgA@mail.gmail.com>

On Sat, Jun 6, 2020 at 12:05 AM Sedat Dilek <[email protected]> wrote:
>
> Hi Jens,
>
> with clang-10 I see this new warning in my build-log:
>
> fs/io_uring.c:5958:2: warning: variable 'ret' is used uninitialized
> whenever switch default is taken [-Wsometimes-uninitialized]
>         default:
>         ^~~~~~~
> fs/io_uring.c:5972:27: note: uninitialized use occurs here
>         io_cqring_add_event(req, ret);
>                                  ^~~
> fs/io_uring.c:5944:13: note: initialize the variable 'ret' to silence
> this warning
>         ssize_t ret;
>                    ^
>                     = 0
> 1 warning generated.
>
> Thanks.
>

This siliences the warning:

$ git diff fs/io_uring.c
diff --git a/fs/io_uring.c b/fs/io_uring.c
index d22830a423f1..b94ad5963e41 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5941,7 +5941,7 @@ static bool io_resubmit_prep(struct io_kiocb *req)
 {
        struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
        struct iov_iter iter;
-       ssize_t ret;
+       ssize_t ret = 0;
        int rw;

        switch (req->opcode) {

- Sedat -

  reply	other threads:[~2020-06-05 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 22:05 [PATCH] io_uring: re-issue plug based block requests that failed Sedat Dilek
2020-06-05 22:13 ` Sedat Dilek [this message]
2020-06-05 22:27 ` 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='CA+icZUX7jibW9QYDy1Hykwp9cH2GGL9EzR=eDQL8UaH6SY0ASQ@mail.gmail.com' \
    [email protected] \
    [email protected] \
    [email protected] \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox