public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v2] io_uring: suppress an unused warning
@ 2023-03-09 12:59 Vincenzo Palazzo
  2023-03-09 16:39 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Vincenzo Palazzo @ 2023-03-09 12:59 UTC (permalink / raw)
  To: io-uring; +Cc: axboe, Vincenzo Palazzo

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..bd38e45522da 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 __maybe_unused;
 	struct io_submit_state *state = &ctx->submit_state;
 
 	__io_cq_lock(ctx);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-09 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 12:59 [PATCH v2] io_uring: suppress an unused warning Vincenzo Palazzo
2023-03-09 16:39 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox