Description:
When building XCOM on OsX/Clang we get
rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:499:18: warning: incompatible pointer types assigning to 'unsigned int (*)(struct __rpc_xdr *)' from 'u_int (const XDR *)' (aka 'unsigned int (const struct __rpc_xdr *)') [-Wincompatible-pointer-types]
ops.x_getpostn = x_getpostn; ^ ~~~~~~~~~~
We really should have a -Werror build for that platform.
For gcc on Alpine Linux, we *do* have a -Werror build, and it fails.
How to repeat:
Build on OsX
See also Bug#25731075: INCOMPATIBLE POINTER TYPES WARNING WHEN BUILDING XCOM
which was inadvertently reverted by
commit 124316f92cc5105bfa8113968119b33fc3db2a70
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date: Fri Mar 31 15:32:36 2017 +0100
WL#10632 - Update XCom in GR
Suggested fix:
Cleanup the ifdefs.
XDR is quite old, and *highly* unlikely to change, so insert appropriate ifdefs to cover our current platforms.
The alternative would be to add cmake feature checks, but that does not seem to be worth the trouble.