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 10:09:05PM +0300, Leon Romanovsky wrote:
> 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?

No idea, maybe they reverted the warning or RH turned it off or ??

I see it here:

gcc version 8.1.0 (Ubuntu 8.1.0-5ubuntu1~16.04) 

As does travis when building the suse package

Jason

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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