summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-04-06 12:12:12 +0200
committerMatt Caswell <matt@openssl.org>2016-04-13 09:59:03 +0200
commit6457615ac82d688a965c9b2cce9611e0559635be (patch)
tree4d82a1620d74f255b1b01840bce706531766a464
parentFix symbols missing from shared build (diff)
downloadopenssl-6457615ac82d688a965c9b2cce9611e0559635be.tar.xz
openssl-6457615ac82d688a965c9b2cce9611e0559635be.zip
Fix explicit de-init macros
The no-op de-init macros may fail because of extraneous ";", so we use a slightly different construct instead. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r--include/openssl/bio.h2
-rw-r--r--include/openssl/comp.h2
-rw-r--r--include/openssl/conf.h2
-rw-r--r--include/openssl/crypto.h2
-rw-r--r--include/openssl/engine.h2
-rw-r--r--include/openssl/err.h2
-rw-r--r--include/openssl/evp.h2
-rw-r--r--include/openssl/objects.h2
-rw-r--r--include/openssl/rand.h2
-rw-r--r--include/openssl/ssl.h2
10 files changed, 10 insertions, 10 deletions
diff --git a/include/openssl/bio.h b/include/openssl/bio.h
index 97a3d9d46c..a168be085d 100644
--- a/include/openssl/bio.h
+++ b/include/openssl/bio.h
@@ -696,7 +696,7 @@ int BIO_socket_ioctl(int fd, long type, void *arg);
int BIO_socket_nbio(int fd, int mode);
int BIO_sock_init(void);
#if OPENSSL_API_COMPAT < 0x10100000L
-# define BIO_sock_cleanup()
+# define BIO_sock_cleanup() while(0) continue
#endif
int BIO_set_tcp_ndelay(int sock, int turn_on);
diff --git a/include/openssl/comp.h b/include/openssl/comp.h
index bfdadce1a1..d2537f8d56 100644
--- a/include/openssl/comp.h
+++ b/include/openssl/comp.h
@@ -81,7 +81,7 @@ int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
COMP_METHOD *COMP_zlib(void);
#if OPENSSL_API_COMPAT < 0x10100000L
-#define COMP_zlib_cleanup()
+#define COMP_zlib_cleanup() while(0) continue
#endif
# ifdef HEADER_BIO_H
diff --git a/include/openssl/conf.h b/include/openssl/conf.h
index 29189d0547..5f7f54707a 100644
--- a/include/openssl/conf.h
+++ b/include/openssl/conf.h
@@ -187,7 +187,7 @@ int CONF_modules_load_file(const char *filename, const char *appname,
void CONF_modules_unload(int all);
void CONF_modules_finish(void);
#if OPENSSL_API_COMPAT < 0x10100000L
-# define CONF_modules_free()
+# define CONF_modules_free() while(0) continue
#endif
int CONF_module_add(const char *name, conf_init_func *ifunc,
conf_finish_func *ffunc);
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index d0ec86a46c..32b88439f2 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -303,7 +303,7 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
* This function cleans up all "ex_data" state. It mustn't be called under
* potential race-conditions.
*/
-# define CRYPTO_cleanup_all_ex_data()
+# define CRYPTO_cleanup_all_ex_data() while(0) continue
/*
* The old locking functions have been removed completely without compatibility
diff --git a/include/openssl/engine.h b/include/openssl/engine.h
index 86a42933c5..3123ad3a1f 100644
--- a/include/openssl/engine.h
+++ b/include/openssl/engine.h
@@ -553,7 +553,7 @@ void *ENGINE_get_ex_data(const ENGINE *e, int idx);
* This function previously cleaned up anything that needs it. Auto-deinit will
* now take care of it so it is no longer required to call this function.
*/
-# define ENGINE_cleanup()
+# define ENGINE_cleanup() while(0) continue
#endif
/*
diff --git a/include/openssl/err.h b/include/openssl/err.h
index deb2fe246e..ccf2ff72de 100644
--- a/include/openssl/err.h
+++ b/include/openssl/err.h
@@ -356,7 +356,7 @@ void ERR_load_ERR_strings(void);
#if OPENSSL_API_COMPAT < 0x10100000L
# define ERR_load_crypto_strings() \
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
-# define ERR_free_strings()
+# define ERR_free_strings() while(0) continue
#endif
void ERR_remove_thread_state(void);
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 2cf6f14130..0dabdbc269 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -912,7 +912,7 @@ const EVP_CIPHER *EVP_seed_ofb(void);
# define OpenSSL_add_all_digests() \
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
-# define EVP_cleanup()
+# define EVP_cleanup() while(0) continue
# endif
int EVP_add_cipher(const EVP_CIPHER *cipher);
diff --git a/include/openssl/objects.h b/include/openssl/objects.h
index c61e49ea35..79e1d3dfa3 100644
--- a/include/openssl/objects.h
+++ b/include/openssl/objects.h
@@ -1104,7 +1104,7 @@ int OBJ_new_nid(int num);
int OBJ_add_object(const ASN1_OBJECT *obj);
int OBJ_create(const char *oid, const char *sn, const char *ln);
#if OPENSSL_API_COMPAT < 0x10100000L
-# define OBJ_cleanup()
+# define OBJ_cleanup() while(0) continue
#endif
int OBJ_create_objects(BIO *in);
diff --git a/include/openssl/rand.h b/include/openssl/rand.h
index 75f7389ebd..d337ee7617 100644
--- a/include/openssl/rand.h
+++ b/include/openssl/rand.h
@@ -93,7 +93,7 @@ int RAND_set_rand_engine(ENGINE *engine);
# endif
RAND_METHOD *RAND_OpenSSL(void);
#if OPENSSL_API_COMPAT < 0x10100000L
-# define RAND_cleanup()
+# define RAND_cleanup() while(0) continue
#endif
int RAND_bytes(unsigned char *buf, int num);
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 6b66407edc..ef7ef56802 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1836,7 +1836,7 @@ STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
__owur STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP)
*meths);
#if OPENSSL_API_COMPAT < 0x10100000L
-# define SSL_COMP_free_compression_methods()
+# define SSL_COMP_free_compression_methods() while(0) continue
#endif
__owur int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);