[dpdk-stable] [dpdk-dev] [PATCH] mlx5: fix __mlx5_bit_off macro warning for Windows

Tal Shnaiderman talshn at nvidia.com
Thu Jan 7 12:40:58 CET 2021


> Subject: Re: [dpdk-dev] [PATCH] mlx5: fix __mlx5_bit_off macro warning for
> Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> On Wed,  6 Jan 2021 15:42:21 +0200, Tal Shnaiderman wrote:
> > While compiling with clang 11 the callers of the __mlx5_bit_off macro
> > warns on the cast of pointers to unsigned long which is a smaller int
> > type in Windows.
> >
> > warning: cast to smaller integer type 'unsigned long'
> > from 'u8 (*)[16]' [-Wpointer-to-int-cast]
> >
> > To resolve it the type is changed to size_t to be compatible for both
> > Linux and Windows.
> 
> uintptr_t is the type for integers storing pointer values, not size_t.

Correct, thanks.


More information about the stable mailing list