Re: [PATCH rdma-core] verbs: Fix warning from gcc-8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 11, 2018 at 11:20:12AM -0600, Jason Gunthorpe wrote:
> gcc-8 now warns on the void (*)(void) cast, use the less pedantically
> correct (void *) cast instead.
>
> ../libibverbs/dummy_ops.c:526:28: warning: cast between incompatible function types from ‘struct ibv_pd * (* const)(struct ibv_context *)’ to ‘void * (*)(void)’ [-Wcast-function-type]
>     (ptr)->_compat_##name = (void *(*)(void))ops->name;    \
>
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> ---
>  libibverbs/dummy_ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

I don't see such warning on my systems,
➜  patches gcc --version
gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)

What should I enable to see it?

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux