summaryrefslogtreecommitdiff
path: root/plugin/auth_pam
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2020-10-22 10:14:17 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2020-10-22 10:14:17 +0700
commit77c00799e501def2868399ec3f39ee1bee3f2384 (patch)
tree42e516ca4964302d6d12018199c834c6fd28ad00 /plugin/auth_pam
parent709ba7dcae871e365697f67677c908b55ad4a964 (diff)
downloadmariadb-git-77c00799e501def2868399ec3f39ee1bee3f2384.tar.gz
MDEV-23935: Fix warnings generated during compilation of plugin/auth_pam/testing/pam_mariadb_mtr.c on MacOS
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.
Diffstat (limited to 'plugin/auth_pam')
-rw-r--r--plugin/auth_pam/testing/CMakeLists.txt6
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})