Put explicit (void) in function declarations and shuffle keywords in some
authormiod <miod@openbsd.org>
Sun, 27 Apr 2014 20:20:57 +0000 (20:20 +0000)
committermiod <miod@openbsd.org>
Sun, 27 Apr 2014 20:20:57 +0000 (20:20 +0000)
declaration to pass -Wextra, should we want to add it to CFLAGS.
No binary change.

32 files changed:
lib/libcrypto/cast/c_enc.c
lib/libcrypto/conf/conf_def.c
lib/libcrypto/conf/conf_sap.c
lib/libcrypto/engine/tb_cipher.c
lib/libcrypto/engine/tb_dh.c
lib/libcrypto/engine/tb_digest.c
lib/libcrypto/engine/tb_dsa.c
lib/libcrypto/engine/tb_ecdh.c
lib/libcrypto/engine/tb_ecdsa.c
lib/libcrypto/engine/tb_pkmeth.c
lib/libcrypto/engine/tb_rand.c
lib/libcrypto/engine/tb_rsa.c
lib/libcrypto/engine/tb_store.c
lib/libcrypto/pqueue/pqueue.c
lib/libcrypto/ts/ts_rsp_sign.c
lib/libcrypto/x509v3/v3_utl.c
lib/libssl/src/crypto/cast/c_enc.c
lib/libssl/src/crypto/conf/conf_def.c
lib/libssl/src/crypto/conf/conf_sap.c
lib/libssl/src/crypto/engine/tb_cipher.c
lib/libssl/src/crypto/engine/tb_dh.c
lib/libssl/src/crypto/engine/tb_digest.c
lib/libssl/src/crypto/engine/tb_dsa.c
lib/libssl/src/crypto/engine/tb_ecdh.c
lib/libssl/src/crypto/engine/tb_ecdsa.c
lib/libssl/src/crypto/engine/tb_pkmeth.c
lib/libssl/src/crypto/engine/tb_rand.c
lib/libssl/src/crypto/engine/tb_rsa.c
lib/libssl/src/crypto/engine/tb_store.c
lib/libssl/src/crypto/pqueue/pqueue.c
lib/libssl/src/crypto/ts/ts_rsp_sign.c
lib/libssl/src/crypto/x509v3/v3_utl.c

index 2ae54f5..a1f2829 100644 (file)
@@ -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];
index bc9f139..d85773d 100644 (file)
@@ -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;
 }
index bbd73df..a8e1f78 100644 (file)
@@ -104,7 +104,7 @@ OPENSSL_config(const char *config_name)
 }
 
 void
-OPENSSL_no_config()
+OPENSSL_no_config(void)
 {
        openssl_configured = 1;
 }
index 177fc1f..8d45a9a 100644 (file)
@@ -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;
 
index 6e9d428..78515ae 100644 (file)
@@ -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;
 
index d3f4bb2..d1bb90a 100644 (file)
@@ -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;
 
index e4674f5..6731aad 100644 (file)
@@ -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;
 
index c8ec781..57354b8 100644 (file)
@@ -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;
 
index 005ecb6..8f30e95 100644 (file)
@@ -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;
 
index 1cdb967..7a59744 100644 (file)
@@ -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;
 
index f36f67c..3745ae7 100644 (file)
@@ -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;
 
index fbc707f..2f4928f 100644 (file)
@@ -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;
 
index 8cc435c..bd85373 100644 (file)
@@ -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;
 
index 5cea753..b8fed50 100644 (file)
@@ -92,7 +92,7 @@ pitem_free(pitem *item)
 }
 
 pqueue_s *
-pqueue_new()
+pqueue_new(void)
 {
        pqueue_s *pq = (pqueue_s *)malloc(sizeof(pqueue_s));
 
index 71530d7..fe5244c 100644 (file)
@@ -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;
 
index f85c1ef..c3328d6 100644 (file)
@@ -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);
index 2ae54f5..a1f2829 100644 (file)
@@ -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];
index bc9f139..d85773d 100644 (file)
@@ -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;
 }
index bbd73df..a8e1f78 100644 (file)
@@ -104,7 +104,7 @@ OPENSSL_config(const char *config_name)
 }
 
 void
-OPENSSL_no_config()
+OPENSSL_no_config(void)
 {
        openssl_configured = 1;
 }
index 177fc1f..8d45a9a 100644 (file)
@@ -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;
 
index 6e9d428..78515ae 100644 (file)
@@ -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;
 
index d3f4bb2..d1bb90a 100644 (file)
@@ -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;
 
index e4674f5..6731aad 100644 (file)
@@ -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;
 
index c8ec781..57354b8 100644 (file)
@@ -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;
 
index 005ecb6..8f30e95 100644 (file)
@@ -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;
 
index 1cdb967..7a59744 100644 (file)
@@ -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;
 
index f36f67c..3745ae7 100644 (file)
@@ -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;
 
index fbc707f..2f4928f 100644 (file)
@@ -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;
 
index 8cc435c..bd85373 100644 (file)
@@ -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;
 
index 5cea753..b8fed50 100644 (file)
@@ -92,7 +92,7 @@ pitem_free(pitem *item)
 }
 
 pqueue_s *
-pqueue_new()
+pqueue_new(void)
 {
        pqueue_s *pq = (pqueue_s *)malloc(sizeof(pqueue_s));
 
index 71530d7..fe5244c 100644 (file)
@@ -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;
 
index f85c1ef..c3328d6 100644 (file)
@@ -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);