[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Pass with -Wstrict-prototypes
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv7122/src/common
Modified Files:
aes.h crypto.c crypto.h tortls.c util.h
Log Message:
Pass with -Wstrict-prototypes
Index: aes.h
===================================================================
RCS file: /home/or/cvsroot/src/common/aes.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- aes.h 10 May 2004 07:54:13 -0000 1.5
+++ aes.h 27 Oct 2004 18:16:36 -0000 1.6
@@ -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);
Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- crypto.c 27 Oct 2004 06:03:28 -0000 1.114
+++ crypto.c 27 Oct 2004 18:16:36 -0000 1.115
@@ -1175,7 +1175,7 @@
/** 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 @@
/** 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;
Index: crypto.h
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- crypto.h 13 Oct 2004 05:54:58 -0000 1.54
+++ crypto.h 27 Oct 2004 18:16:37 -0000 1.55
@@ -46,8 +46,8 @@
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 @@
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 @@
/* 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 @@
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);
Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/src/common/tortls.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- tortls.c 27 Oct 2004 06:37:34 -0000 1.71
+++ tortls.c 27 Oct 2004 18:16:37 -0000 1.72
@@ -147,7 +147,7 @@
/** 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();
Index: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- util.h 27 Oct 2004 06:26:23 -0000 1.106
+++ util.h 27 Oct 2004 18:16:37 -0000 1.107
@@ -140,7 +140,7 @@
/** 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 @@
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. */