diff options
author | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2020-10-11 21:51:45 +0700 |
---|---|---|
committer | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2020-10-11 21:51:45 +0700 |
commit | db1fbafbead6411e54f81aadd8c064a342469fb7 (patch) | |
tree | 296deba0d69d42d6c5eebd69f8cc368e597bb541 | |
parent | c2ac0ce1f02e3ae2b1de5c07ba40bed25c30dc40 (diff) | |
download | mariadb-git-bb-10.4-MDEV-23935.tar.gz |
MDEV-23935: Fix warnings generated during compilation of plugin/auth_pam/testing/pam_mariadb_mtr.c on MacOSbb-10.4-MDEV-23935
During build server 10.4 on MacOS warnings like the following one
are generated on compiling the file plugin/auth_pam/testing/pam_mariadb_mtr.c
server-10.4/plugin/auth_pam/testing/pam_mariadb_mtr.c:25:22: error:
initializing 'char *' with an expression of type 'const char [23]'
discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
{ PAM_TEXT_INFO, "Challenge input first." }
The reason of the warnings is that the data member pam_message::msg is declared
as 'char *' on MacOS but initializer of the data member is 'const char *'.
To eliminate warnings the compiler option
-Wno-incompatible-pointer-types-discards-qualifiers
has been added to the compiler flags used for compiling the file
pam_mariadb_mtr.c.
-rw-r--r-- | plugin/auth_pam/testing/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/auth_pam/testing/CMakeLists.txt b/plugin/auth_pam/testing/CMakeLists.txt index 889cb524402..c8d2e3cbb97 100644 --- a/plugin/auth_pam/testing/CMakeLists.txt +++ b/plugin/auth_pam/testing/CMakeLists.txt @@ -4,6 +4,12 @@ ADD_LIBRARY(pam_mariadb_mtr MODULE pam_mariadb_mtr.c) SET_TARGET_PROPERTIES (pam_mariadb_mtr PROPERTIES PREFIX "") TARGET_LINK_LIBRARIES(pam_mariadb_mtr pam) +IF(APPLE) + SET_SOURCE_FILES_PROPERTIES( + pam_mariadb_mtr.c + PROPERTY COMPILE_FLAGS "-Wno-incompatible-pointer-types-discards-qualifiers") +ENDIF() + SET(dest DESTINATION "${INSTALL_MYSQLTESTDIR}/suite/plugins/pam" COMPONENT Test) INSTALL(TARGETS pam_mariadb_mtr ${dest}) INSTALL(FILES mariadb_mtr.conf RENAME mariadb_mtr ${dest}) |