diff mbox series

[v1] io_uring: suppress an unused warning

Message ID 20230309124758.158474-1-vincenzopalazzodev@gmail.com (mailing list archive)
State New
Headers show
Series [v1] io_uring: suppress an unused warning | expand

Commit Message

Vincenzo Palazzo March 9, 2023, 12:47 p.m. UTC
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 <vincenzopalazzodev@gmail.com>
---
 io_uring/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vincenzo Palazzo March 9, 2023, 1 p.m. UTC | #1
On Thu Mar 9, 2023 at 1:47 PM CET, Vincenzo Palazzo wrote:
> 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 <vincenzopalazzodev@gmail.com>
Please ignore this patch I just send the wrong v1.

I fixed the mistake in the v2

Cheers!

Vincent.
diff mbox series

Patch

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);