Skip to content

Commit dc78d13

Browse files
author
Tor Didriksen
committed
Bug#37273565 Compile MySQL with clang 19 [noclose]
Add compiler warning suppressions for -Wcast-function-type-mismatch when calling xdr_free(). Change-Id: I31b19af7bc4f288f352778cdf82bb3d08c043806 (cherry picked from commit 2c393101d155c4be40d1e81b579350f410693f52)
1 parent 046b3fc commit dc78d13

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugin/group_replication/libmysqlgcs/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,16 @@ ADD_LIBRARY(mysqlgcs STATIC ${XCOM_SOURCES} ${GCS_SOURCES})
237237
# but pick up symbols from the server:
238238
# TARGET_LINK_LIBRARIES(mysqlgcs mysys)
239239

240+
# Lots of C-style casting in the interface to XDR functions.
241+
# xcom_xdr_free((xdrproc_t)proc ...)
242+
# xdr_free((xdrproc_t)xdr_app_data_ptr
243+
# Add -Wno-cast-function-type-mismatch as a PUBLIC property,
244+
# since we have header files calling xdr_free().
245+
MY_CHECK_CXX_COMPILER_WARNING("-Wcast-function-type-mismatch" HAS_WARN_FLAG)
246+
IF(HAS_WARN_FLAG)
247+
TARGET_COMPILE_OPTIONS(mysqlgcs PUBLIC ${HAS_WARN_FLAG})
248+
ENDIF()
249+
240250
IF(CMAKE_VERSION VERSION_GREATER "3.19" AND NOT APPLE_XCODE)
241251
# New in version 3.19:
242252
# An interface library target may be created with source files.

0 commit comments

Comments
 (0)