[MDEV-23925] Fix warnings generated during compilation of mysys_ssl/openssl.c on MacOS Created: 2020-10-09  Updated: 2023-06-22  Resolved: 2020-10-21

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.2.35, 10.3.26, 10.4.16, 10.5.7, 10.6.0

Type: Bug Priority: Major
Reporter: Dmitry Shulga Assignee: Dmitry Shulga
Resolution: Fixed Votes: 0
Labels: None


 Description   

When server is built on MacOS the following warnings are produced by compiler on processing the file mysys_ssl/openssl.c

In case MariaDB serer is build with -DCMAKE_BUILD_TYPE=Debug it results in build error.
In other words, debug build can't be finished successfully on MacOS.

In file included from /Users/shulga/projects/mariadb/server-10.2-MDEV-23564/mysys_ssl/openssl.c:33:
In file included from /usr/local/include/openssl/evp.h:16:
In file included from /usr/local/include/openssl/bio.h:20:
/usr/local/include/openssl/crypto.h:206:10: warning: 'CRYPTO_cleanup_all_ex_data' macro redefined [-Wmacro-redefined]
# define CRYPTO_cleanup_all_ex_data() while(0) continue
         ^
/Users/shulga/projects/mariadb/server-10.2-MDEV-23564/include/ssl_compat.h:46:9: note: previous definition is here
#define CRYPTO_cleanup_all_ex_data()
        ^
In file included from /Users/shulga/projects/mariadb/server-10.2-MDEV-23564/mysys_ssl/openssl.c:33:
/usr/local/include/openssl/evp.h:501:10: warning: 'EVP_MD_CTX_init' macro redefined [-Wmacro-redefined]
# define EVP_MD_CTX_init(ctx)    EVP_MD_CTX_reset((ctx))
         ^
/Users/shulga/projects/mariadb/server-10.2-MDEV-23564/include/ssl_compat.h:33:9: note: previous definition is here
#define EVP_MD_CTX_init(X) do { bzero((X), EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
        ^
In file included from /Users/shulga/projects/mariadb/server-10.2-MDEV-23564/mysys_ssl/openssl.c:33:
/usr/local/include/openssl/evp.h:627:11: warning: 'EVP_CIPHER_CTX_init' macro redefined [-Wmacro-redefined]
#  define EVP_CIPHER_CTX_init(c)      EVP_CIPHER_CTX_reset(c)
          ^
/Users/shulga/projects/mariadb/server-10.2-MDEV-23564/include/ssl_compat.h:35:9: note: previous definition is here
#define EVP_CIPHER_CTX_init(X) do { bzero((X), EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0)
        ^
In file included from /Users/shulga/projects/mariadb/server-10.2-MDEV-23564/mysys_ssl/openssl.c:33:
/usr/local/include/openssl/evp.h:866:11: warning: 'EVP_cleanup' macro redefined [-Wmacro-redefined]
#  define EVP_cleanup() while(0) continue
          ^
/Users/shulga/projects/mariadb/server-10.2-MDEV-23564/include/ssl_compat.h:44:9: note: previous definition is here
#define EVP_cleanup()
        ^
4 warnings generated.


Generated at Thu Feb 08 09:26:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.