On Sat, Jun 6, 2020 at 12:05 AM Sedat Dilek <sedat.dilek@xxxxxxxxx> 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 -