summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/aes.h2
-rw-r--r--src/common/crypto.c4
-rw-r--r--src/common/crypto.h10
-rw-r--r--src/common/tortls.c2
-rw-r--r--src/common/util.h4
5 files changed, 11 insertions, 11 deletions
diff --git a/src/common/aes.h b/src/common/aes.h
index 3c63a0e4f2..085ea55932 100644
--- a/src/common/aes.h
+++ b/src/common/aes.h
@@ -17,7 +17,7 @@
struct aes_cnt_cipher;
typedef struct aes_cnt_cipher aes_cnt_cipher_t;
-aes_cnt_cipher_t* aes_new_cipher();
+aes_cnt_cipher_t* aes_new_cipher(void);
void aes_free_cipher(aes_cnt_cipher_t *cipher);
void aes_set_key(aes_cnt_cipher_t *cipher, const unsigned char *key, int key_bits);
void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, int len, char *output);
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 0ab6d3d3c4..b4659078bc 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1175,7 +1175,7 @@ static BIGNUM *dh_param_g = NULL;
/** Initialize dh_param_p and dh_param_g if they are not already
* set. */
-static void init_dh_param() {
+static void init_dh_param(void) {
BIGNUM *p, *g;
int r;
if (dh_param_p && dh_param_g)
@@ -1366,7 +1366,7 @@ void crypto_dh_free(crypto_dh_env_t *dh)
/** Seed OpenSSL's random number generator with DIGEST_LEN bytes from the
* operating system. Return 0 on suuccess, -1 on failure.
*/
-int crypto_seed_rng()
+int crypto_seed_rng(void)
{
#ifdef MS_WINDOWS
static int provider_set = 0;
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 33e4006c1c..c6df8f0021 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -46,8 +46,8 @@ typedef struct crypto_digest_env_t crypto_digest_env_t;
typedef struct crypto_dh_env_t crypto_dh_env_t;
/* global state */
-int crypto_global_init();
-int crypto_global_cleanup();
+int crypto_global_init(void);
+int crypto_global_cleanup(void);
/* environment setup */
crypto_pk_env_t *crypto_new_pk_env(void);
@@ -100,7 +100,7 @@ void base16_encode(char *dest, size_t destlen, const char *src, size_t srclen);
int base16_decode(char *dest, size_t destlen, const char *src, size_t srclen);
/* Key negotiation */
-crypto_dh_env_t *crypto_dh_new();
+crypto_dh_env_t *crypto_dh_new(void);
int crypto_dh_get_bytes(crypto_dh_env_t *dh);
int crypto_dh_generate_public(crypto_dh_env_t *dh);
int crypto_dh_get_public(crypto_dh_env_t *dh, char *pubkey_out,
@@ -129,7 +129,7 @@ crypto_cipher_env_t *crypto_create_init_cipher(const char *key, int encrypt_mode
/* SHA-1 */
int crypto_digest(const unsigned char *m, int len, unsigned char *digest);
-crypto_digest_env_t *crypto_new_digest_env();
+crypto_digest_env_t *crypto_new_digest_env(void);
void crypto_free_digest_env(crypto_digest_env_t *digest);
void crypto_digest_add_bytes(crypto_digest_env_t *digest, const char *data,
size_t len);
@@ -140,7 +140,7 @@ void crypto_digest_assign(crypto_digest_env_t *into,
const crypto_digest_env_t *from);
/* random numbers */
-int crypto_seed_rng();
+int crypto_seed_rng(void);
int crypto_rand(unsigned int n, unsigned char *to);
void crypto_pseudo_rand(unsigned int n, unsigned char *to);
int crypto_pseudo_rand_int(unsigned int max);
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 03b55c0191..eaef6468bf 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -147,7 +147,7 @@ tor_tls_get_error(tor_tls *tls, int r, int extra,
/** Initialize OpenSSL, unless it has already been initialized.
*/
static void
-tor_tls_init() {
+tor_tls_init(void) {
if (!tls_library_is_initialized) {
SSL_library_init();
SSL_load_error_strings();
diff --git a/src/common/util.h b/src/common/util.h
index f9f50f086e..0b6ffd77e3 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -140,7 +140,7 @@ const char *hex_str(const char *from, size_t fromlen);
/** Generic resizeable array. */
typedef struct smartlist_t smartlist_t;
-smartlist_t *smartlist_create();
+smartlist_t *smartlist_create(void);
void smartlist_free(smartlist_t *sl);
void smartlist_set_capacity(smartlist_t *sl, int n);
void smartlist_clear(smartlist_t *sl);
@@ -234,7 +234,7 @@ char *expand_filename(const char *filename);
int replace_file(const char *from, const char *to);
int spawn_func(int (*func)(void *), void *data);
-void spawn_exit();
+void spawn_exit(void);
/* Because we use threads instead of processes on Windows, we need locking on Windows.
* On Unixy platforms, these functions are no-ops. */