Skip to content

Commit

Permalink
test/no-mmap-inval: fix warning on 32-bit builds
Browse files Browse the repository at this point in the history
Cast the address to uintptr_t first.

Fixes: 794d756 ("test/no-mmap-inval: add test case for invalid SQ ring address")
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Oct 18, 2023
1 parent 794d756 commit f36c22c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/no-mmap-inval.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int main(int argc, char *argv[])
if (argc > 1)
return T_EXIT_SKIP;

p.cq_off.user_addr = (unsigned long long) valloc(8192);
p.cq_off.user_addr = (unsigned long long) (uintptr_t) valloc(8192);

ret = io_uring_setup(2, &p);
if (ret != -EFAULT) {
Expand Down

0 comments on commit f36c22c

Please sign in to comment.