Skip to content

Commit 98c14a0

Browse files
committed
Add __maybe_unused attribute
And then apply it in src/register.c:io_uring_register_buf_ring() as we don't currently use the flags argument. Link: #622 Signed-off-by: Jens Axboe <[email protected]>
1 parent 41d82e1 commit 98c14a0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/lib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
})
3434
#endif
3535

36+
#define __maybe_unused __attribute__((__unused__))
37+
3638
void *__uring_malloc(size_t len);
3739
void __uring_free(void *p);
3840

src/register.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ int io_uring_unregister_ring_fd(struct io_uring *ring)
332332
}
333333

334334
int io_uring_register_buf_ring(struct io_uring *ring,
335-
struct io_uring_buf_reg *reg, unsigned int flags)
335+
struct io_uring_buf_reg *reg,
336+
unsigned int __maybe_unused flags)
336337
{
337338
return ____sys_io_uring_register(ring->ring_fd,
338339
IORING_REGISTER_PBUF_RING, reg, 1);

0 commit comments

Comments
 (0)