Bug #88816 INCOMPATIBLE POINTER TYPES WARNING WHEN BUILDING XCOM
Submitted: 7 Dec 2017 14:25 Modified: 15 Dec 2017 15:16
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.4 OS:Any
Assigned to: CPU Architecture:Any

[7 Dec 2017 14:25] Tor Didriksen
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.
[15 Dec 2017 15:16] Paul DuBois
Posted by developer:
 
Fixed in 8.0.5, 9.0.0.

Code cleanup. No changelog entry needed.