mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Pass with -Wstrict-prototypes
svn:r2614
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+5
-5
@@ -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);
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
+2
-2
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user