public inbox for [email protected]
 help / color / mirror / Atom feed
From: Vincenzo Palazzo <[email protected]>
To: [email protected]
Cc: [email protected], Vincenzo Palazzo <[email protected]>
Subject: [PATCH v1] io_uring: suppress an unused warning
Date: Thu,  9 Mar 2023 13:47:58 +0100	[thread overview]
Message-ID: <[email protected]> (raw)

suppress unused warnings and fix the error that there is
with the W=1 enabled.

Warning generated

io_uring/io_uring.c: In function ‘__io_submit_flush_completions’:
io_uring/io_uring.c:1502:40: error: variable ‘prev’ set but not used [-Werror=unused-but-set-variable]
 1502 |         struct io_wq_work_node *node, *prev;

Signed-off-by: Vincenzo Palazzo <[email protected]>
---
 io_uring/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index fd1cc35a1c00..f2fd13043e12 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1499,7 +1499,7 @@ void io_free_batch_list(struct io_ring_ctx *ctx, struct io_wq_work_node *node)
 static void __io_submit_flush_completions(struct io_ring_ctx *ctx)
 	__must_hold(&ctx->uring_lock)
 {
-	struct io_wq_work_node *node, *prev;
+	struct io_wq_work_node *node, *prev UNUSED;
 	struct io_submit_state *state = &ctx->submit_state;
 
 	__io_cq_lock(ctx);
-- 
2.39.2


             reply	other threads:[~2023-03-09 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 12:47 Vincenzo Palazzo [this message]
2023-03-09 13:00 ` [PATCH v1] io_uring: suppress an unused warning Vincenzo Palazzo

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=20230309124758.158474-1-vincenzopalazzodev@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