From 547ec0d4cc5331d9b94c23102d420332eebf1a3c Mon Sep 17 00:00:00 2001 From: miod Date: Sun, 27 Apr 2014 20:20:57 +0000 Subject: [PATCH] Put explicit (void) in function declarations and shuffle keywords in some declaration to pass -Wextra, should we want to add it to CFLAGS. No binary change. --- lib/libcrypto/cast/c_enc.c | 4 ++-- lib/libcrypto/conf/conf_def.c | 4 ++-- lib/libcrypto/conf/conf_sap.c | 2 +- lib/libcrypto/engine/tb_cipher.c | 2 +- lib/libcrypto/engine/tb_dh.c | 2 +- lib/libcrypto/engine/tb_digest.c | 2 +- lib/libcrypto/engine/tb_dsa.c | 2 +- lib/libcrypto/engine/tb_ecdh.c | 2 +- lib/libcrypto/engine/tb_ecdsa.c | 2 +- lib/libcrypto/engine/tb_pkmeth.c | 2 +- lib/libcrypto/engine/tb_rand.c | 2 +- lib/libcrypto/engine/tb_rsa.c | 2 +- lib/libcrypto/engine/tb_store.c | 2 +- lib/libcrypto/pqueue/pqueue.c | 2 +- lib/libcrypto/ts/ts_rsp_sign.c | 2 +- lib/libcrypto/x509v3/v3_utl.c | 2 +- lib/libssl/src/crypto/cast/c_enc.c | 4 ++-- lib/libssl/src/crypto/conf/conf_def.c | 4 ++-- lib/libssl/src/crypto/conf/conf_sap.c | 2 +- lib/libssl/src/crypto/engine/tb_cipher.c | 2 +- lib/libssl/src/crypto/engine/tb_dh.c | 2 +- lib/libssl/src/crypto/engine/tb_digest.c | 2 +- lib/libssl/src/crypto/engine/tb_dsa.c | 2 +- lib/libssl/src/crypto/engine/tb_ecdh.c | 2 +- lib/libssl/src/crypto/engine/tb_ecdsa.c | 2 +- lib/libssl/src/crypto/engine/tb_pkmeth.c | 2 +- lib/libssl/src/crypto/engine/tb_rand.c | 2 +- lib/libssl/src/crypto/engine/tb_rsa.c | 2 +- lib/libssl/src/crypto/engine/tb_store.c | 2 +- lib/libssl/src/crypto/pqueue/pqueue.c | 2 +- lib/libssl/src/crypto/ts/ts_rsp_sign.c | 2 +- lib/libssl/src/crypto/x509v3/v3_utl.c | 2 +- 32 files changed, 36 insertions(+), 36 deletions(-) diff --git a/lib/libcrypto/cast/c_enc.c b/lib/libcrypto/cast/c_enc.c index 2ae54f5cfbf..a1f28293f13 100644 --- a/lib/libcrypto/cast/c_enc.c +++ b/lib/libcrypto/cast/c_enc.c @@ -63,7 +63,7 @@ void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key) { register CAST_LONG l,r,t; - const register CAST_LONG *k; + register const CAST_LONG *k; k= &(key->data[0]); l=data[0]; @@ -96,7 +96,7 @@ void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key) void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key) { register CAST_LONG l,r,t; - const register CAST_LONG *k; + register const CAST_LONG *k; k= &(key->data[0]); l=data[0]; diff --git a/lib/libcrypto/conf/conf_def.c b/lib/libcrypto/conf/conf_def.c index bc9f139e7ee..d85773df0e8 100644 --- a/lib/libcrypto/conf/conf_def.c +++ b/lib/libcrypto/conf/conf_def.c @@ -117,13 +117,13 @@ static CONF_METHOD WIN32_method = { }; CONF_METHOD * -NCONF_default() +NCONF_default(void) { return &default_method; } CONF_METHOD * -NCONF_WIN32() +NCONF_WIN32(void) { return &WIN32_method; } diff --git a/lib/libcrypto/conf/conf_sap.c b/lib/libcrypto/conf/conf_sap.c index bbd73df812b..a8e1f780930 100644 --- a/lib/libcrypto/conf/conf_sap.c +++ b/lib/libcrypto/conf/conf_sap.c @@ -104,7 +104,7 @@ OPENSSL_config(const char *config_name) } void -OPENSSL_no_config() +OPENSSL_no_config(void) { openssl_configured = 1; } diff --git a/lib/libcrypto/engine/tb_cipher.c b/lib/libcrypto/engine/tb_cipher.c index 177fc1fb739..8d45a9a9cf4 100644 --- a/lib/libcrypto/engine/tb_cipher.c +++ b/lib/libcrypto/engine/tb_cipher.c @@ -85,7 +85,7 @@ int ENGINE_register_ciphers(ENGINE *e) return 1; } -void ENGINE_register_all_ciphers() +void ENGINE_register_all_ciphers(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_dh.c b/lib/libcrypto/engine/tb_dh.c index 6e9d4287610..78515aeaa0c 100644 --- a/lib/libcrypto/engine/tb_dh.c +++ b/lib/libcrypto/engine/tb_dh.c @@ -80,7 +80,7 @@ int ENGINE_register_DH(ENGINE *e) return 1; } -void ENGINE_register_all_DH() +void ENGINE_register_all_DH(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_digest.c b/lib/libcrypto/engine/tb_digest.c index d3f4bb27475..d1bb90aedd6 100644 --- a/lib/libcrypto/engine/tb_digest.c +++ b/lib/libcrypto/engine/tb_digest.c @@ -85,7 +85,7 @@ int ENGINE_register_digests(ENGINE *e) return 1; } -void ENGINE_register_all_digests() +void ENGINE_register_all_digests(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_dsa.c b/lib/libcrypto/engine/tb_dsa.c index e4674f5f071..6731aad1da7 100644 --- a/lib/libcrypto/engine/tb_dsa.c +++ b/lib/libcrypto/engine/tb_dsa.c @@ -80,7 +80,7 @@ int ENGINE_register_DSA(ENGINE *e) return 1; } -void ENGINE_register_all_DSA() +void ENGINE_register_all_DSA(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_ecdh.c b/lib/libcrypto/engine/tb_ecdh.c index c8ec7812c55..57354b8c110 100644 --- a/lib/libcrypto/engine/tb_ecdh.c +++ b/lib/libcrypto/engine/tb_ecdh.c @@ -95,7 +95,7 @@ int ENGINE_register_ECDH(ENGINE *e) return 1; } -void ENGINE_register_all_ECDH() +void ENGINE_register_all_ECDH(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_ecdsa.c b/lib/libcrypto/engine/tb_ecdsa.c index 005ecb622c2..8f30e956e07 100644 --- a/lib/libcrypto/engine/tb_ecdsa.c +++ b/lib/libcrypto/engine/tb_ecdsa.c @@ -80,7 +80,7 @@ int ENGINE_register_ECDSA(ENGINE *e) return 1; } -void ENGINE_register_all_ECDSA() +void ENGINE_register_all_ECDSA(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_pkmeth.c b/lib/libcrypto/engine/tb_pkmeth.c index 1cdb967f253..7a59744102f 100644 --- a/lib/libcrypto/engine/tb_pkmeth.c +++ b/lib/libcrypto/engine/tb_pkmeth.c @@ -86,7 +86,7 @@ int ENGINE_register_pkey_meths(ENGINE *e) return 1; } -void ENGINE_register_all_pkey_meths() +void ENGINE_register_all_pkey_meths(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_rand.c b/lib/libcrypto/engine/tb_rand.c index f36f67c0f6f..3745ae7abd2 100644 --- a/lib/libcrypto/engine/tb_rand.c +++ b/lib/libcrypto/engine/tb_rand.c @@ -80,7 +80,7 @@ int ENGINE_register_RAND(ENGINE *e) return 1; } -void ENGINE_register_all_RAND() +void ENGINE_register_all_RAND(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_rsa.c b/lib/libcrypto/engine/tb_rsa.c index fbc707fd26c..2f4928fd665 100644 --- a/lib/libcrypto/engine/tb_rsa.c +++ b/lib/libcrypto/engine/tb_rsa.c @@ -80,7 +80,7 @@ int ENGINE_register_RSA(ENGINE *e) return 1; } -void ENGINE_register_all_RSA() +void ENGINE_register_all_RSA(void) { ENGINE *e; diff --git a/lib/libcrypto/engine/tb_store.c b/lib/libcrypto/engine/tb_store.c index 8cc435c935f..bd853733ea7 100644 --- a/lib/libcrypto/engine/tb_store.c +++ b/lib/libcrypto/engine/tb_store.c @@ -80,7 +80,7 @@ int ENGINE_register_STORE(ENGINE *e) return 1; } -void ENGINE_register_all_STORE() +void ENGINE_register_all_STORE(void) { ENGINE *e; diff --git a/lib/libcrypto/pqueue/pqueue.c b/lib/libcrypto/pqueue/pqueue.c index 5cea75311eb..b8fed503a5e 100644 --- a/lib/libcrypto/pqueue/pqueue.c +++ b/lib/libcrypto/pqueue/pqueue.c @@ -92,7 +92,7 @@ pitem_free(pitem *item) } pqueue_s * -pqueue_new() +pqueue_new(void) { pqueue_s *pq = (pqueue_s *)malloc(sizeof(pqueue_s)); diff --git a/lib/libcrypto/ts/ts_rsp_sign.c b/lib/libcrypto/ts/ts_rsp_sign.c index 71530d7f242..fe5244c0c5b 100644 --- a/lib/libcrypto/ts/ts_rsp_sign.c +++ b/lib/libcrypto/ts/ts_rsp_sign.c @@ -169,7 +169,7 @@ def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data) /* TS_RESP_CTX management functions. */ TS_RESP_CTX * -TS_RESP_CTX_new() +TS_RESP_CTX_new(void) { TS_RESP_CTX *ctx; diff --git a/lib/libcrypto/x509v3/v3_utl.c b/lib/libcrypto/x509v3/v3_utl.c index f85c1ef82ec..c3328d668dd 100644 --- a/lib/libcrypto/x509v3/v3_utl.c +++ b/lib/libcrypto/x509v3/v3_utl.c @@ -365,7 +365,7 @@ char *hex_to_string(const unsigned char *buffer, long len) char *tmp, *q; const unsigned char *p; int i; - const static char hexdig[] = "0123456789ABCDEF"; + static const char hexdig[] = "0123456789ABCDEF"; if(!buffer || !len) return NULL; if(!(tmp = malloc(len * 3 + 1))) { X509V3err(X509V3_F_HEX_TO_STRING,ERR_R_MALLOC_FAILURE); diff --git a/lib/libssl/src/crypto/cast/c_enc.c b/lib/libssl/src/crypto/cast/c_enc.c index 2ae54f5cfbf..a1f28293f13 100644 --- a/lib/libssl/src/crypto/cast/c_enc.c +++ b/lib/libssl/src/crypto/cast/c_enc.c @@ -63,7 +63,7 @@ void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key) { register CAST_LONG l,r,t; - const register CAST_LONG *k; + register const CAST_LONG *k; k= &(key->data[0]); l=data[0]; @@ -96,7 +96,7 @@ void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key) void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key) { register CAST_LONG l,r,t; - const register CAST_LONG *k; + register const CAST_LONG *k; k= &(key->data[0]); l=data[0]; diff --git a/lib/libssl/src/crypto/conf/conf_def.c b/lib/libssl/src/crypto/conf/conf_def.c index bc9f139e7ee..d85773df0e8 100644 --- a/lib/libssl/src/crypto/conf/conf_def.c +++ b/lib/libssl/src/crypto/conf/conf_def.c @@ -117,13 +117,13 @@ static CONF_METHOD WIN32_method = { }; CONF_METHOD * -NCONF_default() +NCONF_default(void) { return &default_method; } CONF_METHOD * -NCONF_WIN32() +NCONF_WIN32(void) { return &WIN32_method; } diff --git a/lib/libssl/src/crypto/conf/conf_sap.c b/lib/libssl/src/crypto/conf/conf_sap.c index bbd73df812b..a8e1f780930 100644 --- a/lib/libssl/src/crypto/conf/conf_sap.c +++ b/lib/libssl/src/crypto/conf/conf_sap.c @@ -104,7 +104,7 @@ OPENSSL_config(const char *config_name) } void -OPENSSL_no_config() +OPENSSL_no_config(void) { openssl_configured = 1; } diff --git a/lib/libssl/src/crypto/engine/tb_cipher.c b/lib/libssl/src/crypto/engine/tb_cipher.c index 177fc1fb739..8d45a9a9cf4 100644 --- a/lib/libssl/src/crypto/engine/tb_cipher.c +++ b/lib/libssl/src/crypto/engine/tb_cipher.c @@ -85,7 +85,7 @@ int ENGINE_register_ciphers(ENGINE *e) return 1; } -void ENGINE_register_all_ciphers() +void ENGINE_register_all_ciphers(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_dh.c b/lib/libssl/src/crypto/engine/tb_dh.c index 6e9d4287610..78515aeaa0c 100644 --- a/lib/libssl/src/crypto/engine/tb_dh.c +++ b/lib/libssl/src/crypto/engine/tb_dh.c @@ -80,7 +80,7 @@ int ENGINE_register_DH(ENGINE *e) return 1; } -void ENGINE_register_all_DH() +void ENGINE_register_all_DH(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_digest.c b/lib/libssl/src/crypto/engine/tb_digest.c index d3f4bb27475..d1bb90aedd6 100644 --- a/lib/libssl/src/crypto/engine/tb_digest.c +++ b/lib/libssl/src/crypto/engine/tb_digest.c @@ -85,7 +85,7 @@ int ENGINE_register_digests(ENGINE *e) return 1; } -void ENGINE_register_all_digests() +void ENGINE_register_all_digests(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_dsa.c b/lib/libssl/src/crypto/engine/tb_dsa.c index e4674f5f071..6731aad1da7 100644 --- a/lib/libssl/src/crypto/engine/tb_dsa.c +++ b/lib/libssl/src/crypto/engine/tb_dsa.c @@ -80,7 +80,7 @@ int ENGINE_register_DSA(ENGINE *e) return 1; } -void ENGINE_register_all_DSA() +void ENGINE_register_all_DSA(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_ecdh.c b/lib/libssl/src/crypto/engine/tb_ecdh.c index c8ec7812c55..57354b8c110 100644 --- a/lib/libssl/src/crypto/engine/tb_ecdh.c +++ b/lib/libssl/src/crypto/engine/tb_ecdh.c @@ -95,7 +95,7 @@ int ENGINE_register_ECDH(ENGINE *e) return 1; } -void ENGINE_register_all_ECDH() +void ENGINE_register_all_ECDH(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_ecdsa.c b/lib/libssl/src/crypto/engine/tb_ecdsa.c index 005ecb622c2..8f30e956e07 100644 --- a/lib/libssl/src/crypto/engine/tb_ecdsa.c +++ b/lib/libssl/src/crypto/engine/tb_ecdsa.c @@ -80,7 +80,7 @@ int ENGINE_register_ECDSA(ENGINE *e) return 1; } -void ENGINE_register_all_ECDSA() +void ENGINE_register_all_ECDSA(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_pkmeth.c b/lib/libssl/src/crypto/engine/tb_pkmeth.c index 1cdb967f253..7a59744102f 100644 --- a/lib/libssl/src/crypto/engine/tb_pkmeth.c +++ b/lib/libssl/src/crypto/engine/tb_pkmeth.c @@ -86,7 +86,7 @@ int ENGINE_register_pkey_meths(ENGINE *e) return 1; } -void ENGINE_register_all_pkey_meths() +void ENGINE_register_all_pkey_meths(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_rand.c b/lib/libssl/src/crypto/engine/tb_rand.c index f36f67c0f6f..3745ae7abd2 100644 --- a/lib/libssl/src/crypto/engine/tb_rand.c +++ b/lib/libssl/src/crypto/engine/tb_rand.c @@ -80,7 +80,7 @@ int ENGINE_register_RAND(ENGINE *e) return 1; } -void ENGINE_register_all_RAND() +void ENGINE_register_all_RAND(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_rsa.c b/lib/libssl/src/crypto/engine/tb_rsa.c index fbc707fd26c..2f4928fd665 100644 --- a/lib/libssl/src/crypto/engine/tb_rsa.c +++ b/lib/libssl/src/crypto/engine/tb_rsa.c @@ -80,7 +80,7 @@ int ENGINE_register_RSA(ENGINE *e) return 1; } -void ENGINE_register_all_RSA() +void ENGINE_register_all_RSA(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/engine/tb_store.c b/lib/libssl/src/crypto/engine/tb_store.c index 8cc435c935f..bd853733ea7 100644 --- a/lib/libssl/src/crypto/engine/tb_store.c +++ b/lib/libssl/src/crypto/engine/tb_store.c @@ -80,7 +80,7 @@ int ENGINE_register_STORE(ENGINE *e) return 1; } -void ENGINE_register_all_STORE() +void ENGINE_register_all_STORE(void) { ENGINE *e; diff --git a/lib/libssl/src/crypto/pqueue/pqueue.c b/lib/libssl/src/crypto/pqueue/pqueue.c index 5cea75311eb..b8fed503a5e 100644 --- a/lib/libssl/src/crypto/pqueue/pqueue.c +++ b/lib/libssl/src/crypto/pqueue/pqueue.c @@ -92,7 +92,7 @@ pitem_free(pitem *item) } pqueue_s * -pqueue_new() +pqueue_new(void) { pqueue_s *pq = (pqueue_s *)malloc(sizeof(pqueue_s)); diff --git a/lib/libssl/src/crypto/ts/ts_rsp_sign.c b/lib/libssl/src/crypto/ts/ts_rsp_sign.c index 71530d7f242..fe5244c0c5b 100644 --- a/lib/libssl/src/crypto/ts/ts_rsp_sign.c +++ b/lib/libssl/src/crypto/ts/ts_rsp_sign.c @@ -169,7 +169,7 @@ def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data) /* TS_RESP_CTX management functions. */ TS_RESP_CTX * -TS_RESP_CTX_new() +TS_RESP_CTX_new(void) { TS_RESP_CTX *ctx; diff --git a/lib/libssl/src/crypto/x509v3/v3_utl.c b/lib/libssl/src/crypto/x509v3/v3_utl.c index f85c1ef82ec..c3328d668dd 100644 --- a/lib/libssl/src/crypto/x509v3/v3_utl.c +++ b/lib/libssl/src/crypto/x509v3/v3_utl.c @@ -365,7 +365,7 @@ char *hex_to_string(const unsigned char *buffer, long len) char *tmp, *q; const unsigned char *p; int i; - const static char hexdig[] = "0123456789ABCDEF"; + static const char hexdig[] = "0123456789ABCDEF"; if(!buffer || !len) return NULL; if(!(tmp = malloc(len * 3 + 1))) { X509V3err(X509V3_F_HEX_TO_STRING,ERR_R_MALLOC_FAILURE); -- 2.20.1