Re: [RFC PATCH v1 3/3] liburing: add test programs for napi busy poll

Ammar Faizi
2022-11-03T22:20:28Z

On 11/4/22 3:40 AM, Stefan Roesch wrote:
> +void *encodeUserData(char type, int fd)
> +{
> + return (void *)((uint32_t)fd | ((__u64)type << 56));
> +}
This breaks 32-bit build.

i686-linux-gnu-gcc -Werror -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -g -O3 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o napi-busy-poll-client.t napi-busy-poll-client.c helpers.o -L../src/ -luring -lpthread
napi-busy-poll-client.c: In function ‘encodeUserData’:
napi-busy-poll-client.c:119:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
119 | return (void *)((uint32_t)fd | ((__u64)type << 56));
| ^
cc1: all warnings being treated as errors

--
Ammar Faizi