On Wed, Jul 11, 2018 at 01:57:04PM -0600, Jason Gunthorpe wrote: > 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 ?? It looks so, ➜ gcc -Q --help=warning | grep "Wcast-function-type" -Wcast-function-type [disabled] > > I see it here: > > gcc version 8.1.0 (Ubuntu 8.1.0-5ubuntu1~16.04) > > As does travis when building the suse package You need to add this warning to CmakeList.txt https://github.com/linux-rdma/rdma-core/blob/master/CMakeLists.txt#L165 Thanks > > 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
Attachment:
signature.asc
Description: PGP signature