From a5d0d6b8fd1645c150e1b276863157bb29f0f598 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 23 Jan 2018 09:46:13 -0500 Subject: [PATCH] Remove redundant declarations of ERR_load_*_strings() In commit 52df25cf2e656146cb3b206d8220124f0417d03f, the ERR_load_FOO_strings() functions were moved from their original location in foo.h into new headers called fooerr.h. But they were never removed from their original locations. This duplication causes redundant-declaration warnings on programs that use OpenSSL's headers with such warnings enabled. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5150) --- include/openssl/async.h | 1 - include/openssl/bio.h | 1 - include/openssl/bn.h | 1 - include/openssl/buffer.h | 1 - include/openssl/cms.h | 1 - include/openssl/comp.h | 1 - include/openssl/conf.h | 1 - include/openssl/crypto.h | 1 - include/openssl/ct.h | 1 - include/openssl/dh.h | 1 - include/openssl/dsa.h | 1 - include/openssl/ec.h | 1 - include/openssl/engine.h | 1 - include/openssl/evp.h | 1 - include/openssl/kdf.h | 1 - include/openssl/objects.h | 1 - include/openssl/ocsp.h | 1 - include/openssl/pem.h | 1 - include/openssl/pem2.h | 4 ---- include/openssl/rand.h | 1 - include/openssl/rsa.h | 1 - include/openssl/ssl.h | 1 - include/openssl/store.h | 6 ------ include/openssl/ts.h | 1 - include/openssl/ui.h | 1 - 25 files changed, 33 deletions(-) diff --git a/include/openssl/async.h b/include/openssl/async.h index 45ff30a96f..4db02c39c5 100644 --- a/include/openssl/async.h +++ b/include/openssl/async.h @@ -69,7 +69,6 @@ ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job); void ASYNC_block_pause(void); void ASYNC_unblock_pause(void); -int ERR_load_ASYNC_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/bio.h b/include/openssl/bio.h index d8d8ac4031..4a32a0de8b 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h @@ -790,7 +790,6 @@ long (*BIO_meth_get_callback_ctrl(BIO_METHOD *biom)) int BIO_meth_set_callback_ctrl(BIO_METHOD *biom, long (*callback_ctrl) (BIO *, int, BIO_info_cb *)); -int ERR_load_BIO_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/bn.h b/include/openssl/bn.h index 93c8fe962e..ebca6f91de 100644 --- a/include/openssl/bn.h +++ b/include/openssl/bn.h @@ -481,7 +481,6 @@ BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn); int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom); -int ERR_load_BN_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/buffer.h b/include/openssl/buffer.h index 6f243bac64..8868e85472 100644 --- a/include/openssl/buffer.h +++ b/include/openssl/buffer.h @@ -51,7 +51,6 @@ size_t BUF_MEM_grow(BUF_MEM *str, size_t len); size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len); void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); -int ERR_load_BUF_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/cms.h b/include/openssl/cms.h index c9294e5b4f..791012759e 100644 --- a/include/openssl/cms.h +++ b/include/openssl/cms.h @@ -335,7 +335,6 @@ int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg, # define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \ CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE -int ERR_load_CMS_strings(void); # ifdef __cplusplus } # endif diff --git a/include/openssl/comp.h b/include/openssl/comp.h index 27ff6597c7..6b20aac4c4 100644 --- a/include/openssl/comp.h +++ b/include/openssl/comp.h @@ -45,7 +45,6 @@ const BIO_METHOD *BIO_f_zlib(void); # endif # endif -int ERR_load_COMP_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/conf.h b/include/openssl/conf.h index 702dceb0a2..bca8a05420 100644 --- a/include/openssl/conf.h +++ b/include/openssl/conf.h @@ -161,7 +161,6 @@ int CONF_parse_list(const char *list, int sep, int nospc, void OPENSSL_load_builtin_modules(void); -int ERR_load_CONF_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 478f9e2843..4daf0c738c 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -439,7 +439,6 @@ int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key); CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void); int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b); -int ERR_load_CRYPTO_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/ct.h b/include/openssl/ct.h index 96f3b7cfe6..68c5d41327 100644 --- a/include/openssl/ct.h +++ b/include/openssl/ct.h @@ -469,7 +469,6 @@ __owur int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file); */ __owur int CTLOG_STORE_load_default_file(CTLOG_STORE *store); -int ERR_load_CT_strings(void); # ifdef __cplusplus } # endif diff --git a/include/openssl/dh.h b/include/openssl/dh.h index 00858244b8..2a12b9df72 100644 --- a/include/openssl/dh.h +++ b/include/openssl/dh.h @@ -327,7 +327,6 @@ int DH_meth_set_generate_params(DH_METHOD *dhm, # define EVP_PKEY_DH_KDF_X9_42 2 # endif -int ERR_load_DH_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h index d8e680c6bf..39f0f57463 100644 --- a/include/openssl/dsa.h +++ b/include/openssl/dsa.h @@ -224,7 +224,6 @@ int DSA_meth_set_paramgen(DSA_METHOD *dsam, int (*DSA_meth_get_keygen(const DSA_METHOD *dsam)) (DSA *); int DSA_meth_set_keygen(DSA_METHOD *dsam, int (*keygen) (DSA *)); -int ERR_load_DSA_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/ec.h b/include/openssl/ec.h index 65800dd4b3..a8627cf6f9 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -1346,7 +1346,6 @@ void EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, # define EVP_PKEY_ECDH_KDF_NONE 1 # define EVP_PKEY_ECDH_KDF_X9_62 2 -int ERR_load_EC_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/engine.h b/include/openssl/engine.h index 9f5975722b..89722b0212 100644 --- a/include/openssl/engine.h +++ b/include/openssl/engine.h @@ -743,7 +743,6 @@ void *ENGINE_get_static_state(void); DEPRECATEDIN_1_1_0(void ENGINE_setup_bsd_cryptodev(void)) # endif -int ERR_load_ENGINE_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 4a3fee12eb..268e90f3d5 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1587,7 +1587,6 @@ void EVP_PKEY_meth_get_param_check(EVP_PKEY_METHOD *pmeth, void EVP_add_alg_module(void); -int ERR_load_EVP_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/kdf.h b/include/openssl/kdf.h index 26380ca479..c1733a5beb 100644 --- a/include/openssl/kdf.h +++ b/include/openssl/kdf.h @@ -90,7 +90,6 @@ extern "C" { EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES, maxmem_bytes) -int ERR_load_KDF_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/objects.h b/include/openssl/objects.h index 54b42ee674..484562d863 100644 --- a/include/openssl/objects.h +++ b/include/openssl/objects.h @@ -168,7 +168,6 @@ int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); int OBJ_add_sigid(int signid, int dig_id, int pkey_id); void OBJ_sigid_free(void); -int ERR_load_OBJ_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/ocsp.h b/include/openssl/ocsp.h index 0b89a64eec..a5c44768aa 100644 --- a/include/openssl/ocsp.h +++ b/include/openssl/ocsp.h @@ -345,7 +345,6 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags); int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags); -int ERR_load_OCSP_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/pem.h b/include/openssl/pem.h index 10b19a5985..3b21ab8234 100644 --- a/include/openssl/pem.h +++ b/include/openssl/pem.h @@ -372,7 +372,6 @@ int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, # endif # endif -int ERR_load_PEM_strings(void); # ifdef __cplusplus } # endif diff --git a/include/openssl/pem2.h b/include/openssl/pem2.h index cfe73f139e..8a46324af3 100644 --- a/include/openssl/pem2.h +++ b/include/openssl/pem2.h @@ -11,10 +11,6 @@ extern "C" { #endif -#ifndef HEADER_PEM_H -int ERR_load_PEM_strings(void); -#endif - #ifdef __cplusplus } #endif diff --git a/include/openssl/rand.h b/include/openssl/rand.h index 2dec35ea53..cfccd716d5 100644 --- a/include/openssl/rand.h +++ b/include/openssl/rand.h @@ -71,7 +71,6 @@ DEPRECATEDIN_1_1_0(void RAND_screen(void)) DEPRECATEDIN_1_1_0(int RAND_event(UINT, WPARAM, LPARAM)) # endif -int ERR_load_RAND_strings(void); #ifdef __cplusplus } diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h index 8985219aee..38d9f01069 100644 --- a/include/openssl/rsa.h +++ b/include/openssl/rsa.h @@ -496,7 +496,6 @@ int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth, int (*keygen) (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb)); -int ERR_load_RSA_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 9c45b90075..825490b5c2 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -2292,7 +2292,6 @@ __owur int SSL_alloc_buffers(SSL *ssl); extern const char SSL_version_str[]; -int ERR_load_SSL_strings(void); typedef unsigned int (*DTLS_timer_cb)(SSL *s, unsigned int timer_us); diff --git a/include/openssl/store.h b/include/openssl/store.h index 43cf2031e7..dff9d1e521 100644 --- a/include/openssl/store.h +++ b/include/openssl/store.h @@ -203,12 +203,6 @@ int OSSL_STORE_do_all_loaders(void (*do_function) (const OSSL_STORE_LOADER *loader, void *do_arg), void *do_arg); - -/* - * Error strings - */ -int ERR_load_OSSL_STORE_strings(void); - # ifdef __cplusplus } # endif diff --git a/include/openssl/ts.h b/include/openssl/ts.h index 5d56c96a3b..3317e8f761 100644 --- a/include/openssl/ts.h +++ b/include/openssl/ts.h @@ -551,7 +551,6 @@ int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_ess_cert_id_digest(CONF *conf, const char *section, TS_RESP_CTX *ctx); -int ERR_load_TS_strings(void); # ifdef __cplusplus } diff --git a/include/openssl/ui.h b/include/openssl/ui.h index 1da1ccb480..ab1d7e30d8 100644 --- a/include/openssl/ui.h +++ b/include/openssl/ui.h @@ -361,7 +361,6 @@ int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, int verify); UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag); -int ERR_load_UI_strings(void); # ifdef __cplusplus } -- 2.25.1