summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-08-20 16:24:00 -0400
committerAdam Langley <agl@google.com>2014-08-21 01:06:07 +0000
commitc44d2f4cb8a892a603edbbe710fa82bcd30f9cb5 (patch)
tree8e26839eef5cc06c2bd3b0e3461f33b746b48d15 /include
parent5213df4e9ed9ca130c40f142893cb91f2e18eee1 (diff)
downloadsrc-c44d2f4cb8a892a603edbbe710fa82bcd30f9cb5.tar.gz
Convert all zero-argument functions to '(void)'
Otherwise, in C, it becomes a K&R function declaration which doesn't actually type-check the number of arguments. Change-Id: I0731a9fefca46fb1c266bfb1c33d464cf451a22e Reviewed-on: https://boringssl-review.googlesource.com/1582 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/openssl/aead.h8
-rw-r--r--include/openssl/conf.h2
-rw-r--r--include/openssl/cpu.h4
-rw-r--r--include/openssl/engine.h2
-rw-r--r--include/openssl/err.h8
-rw-r--r--include/openssl/evp.h6
-rw-r--r--include/openssl/pqueue.h2
-rw-r--r--include/openssl/rand.h2
8 files changed, 17 insertions, 17 deletions
diff --git a/include/openssl/aead.h b/include/openssl/aead.h
index 6f66e9c..ad2bbf7 100644
--- a/include/openssl/aead.h
+++ b/include/openssl/aead.h
@@ -99,7 +99,7 @@ OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_128_gcm(void);
OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_256_gcm(void);
/* EVP_aead_chacha20_poly1305 is an AEAD built from ChaCha20 and Poly1305. */
-OPENSSL_EXPORT const EVP_AEAD *EVP_aead_chacha20_poly1305();
+OPENSSL_EXPORT const EVP_AEAD *EVP_aead_chacha20_poly1305(void);
/* EVP_aead_aes_128_key_wrap is AES-128 Key Wrap mode. This should never be
* used except to interoperate with existing systems that use this mode.
@@ -107,13 +107,13 @@ OPENSSL_EXPORT const EVP_AEAD *EVP_aead_chacha20_poly1305();
* If the nonce is emtpy then the default nonce will be used, otherwise it must
* be eight bytes long. The input must be a multiple of eight bytes long. No
* additional data can be given to this mode. */
-OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_128_key_wrap();
+OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_128_key_wrap(void);
/* EVP_aead_aes_256_key_wrap is AES-256 in Key Wrap mode. This should never be
* used except to interoperate with existing systems that use this mode.
*
* See |EVP_aead_aes_128_key_wrap| for details. */
-OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_256_key_wrap();
+OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_256_key_wrap(void);
/* EVP_has_aes_hardware returns one if we enable hardware support for fast and
* constant-time AES-GCM. */
@@ -129,7 +129,7 @@ OPENSSL_EXPORT int EVP_has_aes_hardware(void);
/* EVP_aead_rc4_md5_tls uses RC4 and HMAC(MD5) in MAC-then-encrypt mode. Unlike
* a standard AEAD, this is stateful as the RC4 state is carried from operation
* to operation. */
-OPENSSL_EXPORT const EVP_AEAD *EVP_aead_rc4_md5_tls();
+OPENSSL_EXPORT const EVP_AEAD *EVP_aead_rc4_md5_tls(void);
/* Utility functions. */
diff --git a/include/openssl/conf.h b/include/openssl/conf.h
index 51c5525..c67e023 100644
--- a/include/openssl/conf.h
+++ b/include/openssl/conf.h
@@ -91,7 +91,7 @@ struct conf_st {
/* NCONF_new returns a fresh, empty |CONF|, or NULL on error. */
-CONF *NCONF_new();
+CONF *NCONF_new(void);
/* NCONF_free frees all the data owned by |conf| and then |conf| itself. */
void NCONF_free(CONF *conf);
diff --git a/include/openssl/cpu.h b/include/openssl/cpu.h
index 3cc1e5e..5f60754 100644
--- a/include/openssl/cpu.h
+++ b/include/openssl/cpu.h
@@ -90,7 +90,7 @@ extern uint32_t OPENSSL_ia32cap_P[4];
/* CRYPTO_is_NEON_capable returns true if the current CPU has a NEON unit. Note
* that |OPENSSL_armcap_P| also exists and contains the same information in a
* form that's easier for assembly to use. */
-OPENSSL_EXPORT char CRYPTO_is_NEON_capable();
+OPENSSL_EXPORT char CRYPTO_is_NEON_capable(void);
/* CRYPTO_set_NEON_capable sets the return value of |CRYPTO_is_NEON_capable|.
* By default, unless the code was compiled with |-mfpu=neon|, NEON is assumed
@@ -101,7 +101,7 @@ OPENSSL_EXPORT void CRYPTO_set_NEON_capable(char neon_capable);
/* CRYPTO_is_NEON_functional returns true if the current CPU has a /working/
* NEON unit. Some phones have a NEON unit, but the Poly1305 NEON code causes
* it to fail. See https://code.google.com/p/chromium/issues/detail?id=341598 */
-OPENSSL_EXPORT char CRYPTO_is_NEON_functional();
+OPENSSL_EXPORT char CRYPTO_is_NEON_functional(void);
/* CRYPTO_set_NEON_functional sets the "NEON functional" flag. For
* |CRYPTO_is_NEON_functional| to return true, both this flag and the NEON flag
diff --git a/include/openssl/engine.h b/include/openssl/engine.h
index f2916b3..367e98e 100644
--- a/include/openssl/engine.h
+++ b/include/openssl/engine.h
@@ -37,7 +37,7 @@ extern "C" {
/* ENGINE_new returns an empty ENGINE that uses the default method for all
* algorithms. */
-OPENSSL_EXPORT ENGINE *ENGINE_new();
+OPENSSL_EXPORT ENGINE *ENGINE_new(void);
/* ENGINE_free decrements the reference counts for all methods linked from
* |engine| and frees |engine| itself. */
diff --git a/include/openssl/err.h b/include/openssl/err.h
index d8e7cd5..67a2601 100644
--- a/include/openssl/err.h
+++ b/include/openssl/err.h
@@ -146,11 +146,11 @@ extern "C" {
* values. If this is not called then the string forms of errors produced by
* the functions below will contain numeric identifiers rather than
* human-readable strings. */
-OPENSSL_EXPORT void ERR_load_crypto_strings();
+OPENSSL_EXPORT void ERR_load_crypto_strings(void);
/* ERR_free_strings frees any internal error values that have been loaded. This
* should only be called at process shutdown. */
-OPENSSL_EXPORT void ERR_free_strings();
+OPENSSL_EXPORT void ERR_free_strings(void);
/* Reading and formatting errors. */
@@ -266,7 +266,7 @@ OPENSSL_EXPORT void ERR_remove_thread_state(const CRYPTO_THREADID *tid);
/* ERR_get_next_error_library returns a value suitable for passing as the
* |library| argument to |ERR_put_error|. This is intended for code that wishes
* to push its own, non-standard errors to the error queue. */
-OPENSSL_EXPORT int ERR_get_next_error_library();
+OPENSSL_EXPORT int ERR_get_next_error_library(void);
/* Private functions. */
@@ -515,7 +515,7 @@ struct ERR_FNS_st {
/* ERR_load_BIO_strings does nothing.
*
* TODO(fork): remove. libjingle calls this. */
-OPENSSL_EXPORT void ERR_load_BIO_strings();
+OPENSSL_EXPORT void ERR_load_BIO_strings(void);
#if defined(__cplusplus)
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index edeb850..091912f 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -83,7 +83,7 @@ extern "C" {
/* EVP_PKEY_new creates a new, empty public-key object and returns it or NULL
* on allocation failure. */
-OPENSSL_EXPORT EVP_PKEY *EVP_PKEY_new();
+OPENSSL_EXPORT EVP_PKEY *EVP_PKEY_new(void);
/* EVP_PKEY_free frees all data referenced by |pkey| and then frees |pkey|
* itself. */
@@ -708,10 +708,10 @@ OPENSSL_EXPORT int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx,
/* Private functions */
/* OpenSSL_add_all_algorithms does nothing. */
-OPENSSL_EXPORT void OpenSSL_add_all_algorithms();
+OPENSSL_EXPORT void OpenSSL_add_all_algorithms(void);
/* EVP_cleanup does nothing. */
-OPENSSL_EXPORT void EVP_cleanup();
+OPENSSL_EXPORT void EVP_cleanup(void);
/* EVP_PKEY_asn1_find returns the ASN.1 method table for the given |nid|, which
* should be one of the |EVP_PKEY_*| values. It returns NULL if |nid| is
diff --git a/include/openssl/pqueue.h b/include/openssl/pqueue.h
index 8ad023a..af6f7f1 100644
--- a/include/openssl/pqueue.h
+++ b/include/openssl/pqueue.h
@@ -84,7 +84,7 @@ typedef struct _pitem *piterator;
/* pqueue_new allocates a fresh, empty priority queue object and returns it, or
* NULL on error. */
-pqueue pqueue_new();
+pqueue pqueue_new(void);
/* pqueue_free frees |pq| but not any of the items it points to. Thus |pq| must
* be empty or a memory leak will occur. */
diff --git a/include/openssl/rand.h b/include/openssl/rand.h
index d17c3ea..5a84a89 100644
--- a/include/openssl/rand.h
+++ b/include/openssl/rand.h
@@ -28,7 +28,7 @@ OPENSSL_EXPORT int RAND_bytes(uint8_t *buf, size_t len);
/* RAND_cleanup frees any resources used by the RNG. This is not safe if other
* threads might still be calling |RAND_bytes|. */
-OPENSSL_EXPORT void RAND_cleanup();
+OPENSSL_EXPORT void RAND_cleanup(void);
/* Deprecated functions */