diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-08-29 11:43:34 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-08-29 11:43:34 +0200 |
commit | 0be45899fd21ec0aa837dbaf1d1f05193d35dbcc (patch) | |
tree | 3b3ad22cfb524c4d87de00d969acd96830268f6d /src | |
parent | 043df1b3dfb836d6684d579d993485c2f3e080c0 (diff) | |
download | gnutls-0be45899fd21ec0aa837dbaf1d1f05193d35dbcc.tar.gz |
Fix warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/certtool-cfg.c | 2 | ||||
-rw-r--r-- | src/certtool.c | 28 | ||||
-rw-r--r-- | src/cli.c | 2 | ||||
-rw-r--r-- | src/common.c | 8 | ||||
-rw-r--r-- | src/crypt.c | 6 | ||||
-rw-r--r-- | src/prime.c | 3 | ||||
-rw-r--r-- | src/printlist.c | 2 | ||||
-rw-r--r-- | src/serv.c | 7 | ||||
-rw-r--r-- | src/tests.c | 4 | ||||
-rw-r--r-- | src/tls_test.c | 2 |
10 files changed, 31 insertions, 33 deletions
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c index 609c7888fc..83e6ff60df 100644 --- a/src/certtool-cfg.c +++ b/src/certtool-cfg.c @@ -217,7 +217,7 @@ read_crq_set (gnutls_x509_crq_t crq, const char *input_str, const char *oid) /* The input_str should contain %d or %u to print the default. */ -int +static int read_int_with_default (const char *input_str, int def) { char *in; diff --git a/src/certtool.c b/src/certtool.c index cd9732ed5b..0a17ffb6f3 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -104,7 +104,7 @@ main (int argc, char **argv) return 0; } -const char * +static const char * raw_to_string (const unsigned char *raw, size_t raw_size) { static char buf[1024]; @@ -125,7 +125,7 @@ raw_to_string (const unsigned char *raw, size_t raw_size) return buf; } -void +static void print_dsa_pkey (gnutls_datum * x, gnutls_datum * y, gnutls_datum * p, gnutls_datum * q, gnutls_datum * g) { @@ -141,7 +141,7 @@ print_dsa_pkey (gnutls_datum * x, gnutls_datum * y, gnutls_datum * p, print_hex_datum (g); } -void +static void print_rsa_pkey (gnutls_datum * m, gnutls_datum * e, gnutls_datum * d, gnutls_datum * p, gnutls_datum * q, gnutls_datum * u) { @@ -237,7 +237,7 @@ print_private_key (gnutls_x509_privkey_t key) fwrite (buffer, 1, size, outfile); } -void +static void generate_private_key (void) { gnutls_x509_privkey_t key; @@ -250,7 +250,7 @@ generate_private_key (void) } -gnutls_x509_crt_t +static gnutls_x509_crt_t generate_certificate (gnutls_x509_privkey_t * ret_key, gnutls_x509_crt_t ca_crt, int proxy) { @@ -575,7 +575,7 @@ generate_certificate (gnutls_x509_privkey_t * ret_key, } -gnutls_x509_crl_t +static gnutls_x509_crl_t generate_crl (void) { gnutls_x509_crl_t crl; @@ -661,7 +661,7 @@ generate_self_signed (void) gnutls_x509_privkey_deinit (key); } -void +static void generate_signed_certificate (void) { gnutls_x509_crt_t crt; @@ -703,7 +703,7 @@ generate_signed_certificate (void) gnutls_x509_privkey_deinit (key); } -void +static void generate_proxy_certificate (void) { gnutls_x509_crt_t crt, eecrt; @@ -737,7 +737,7 @@ generate_proxy_certificate (void) gnutls_x509_privkey_deinit (key); } -void +static void generate_signed_crl (void) { gnutls_x509_crl_t crl; @@ -762,7 +762,7 @@ generate_signed_crl (void) gnutls_x509_crl_deinit (crl); } -void +static void update_signed_certificate (void) { gnutls_x509_crt_t crt; @@ -805,7 +805,7 @@ update_signed_certificate (void) gnutls_x509_crt_deinit (crt); } -FILE * +static FILE * safe_open_rw (const char *file) { mode_t oldmask; @@ -1786,7 +1786,7 @@ static void print_verification_res (gnutls_x509_crt_t crt, #define CERT_SEP "-----BEGIN CERT" #define CRL_SEP "-----BEGIN X509 CRL" -int +static int _verify_x509_mem (const void *cert, int cert_size) { int siz, i; @@ -2370,7 +2370,7 @@ generate_pkcs12 (void) } -const char * +static const char * BAGTYPE (gnutls_pkcs12_bag_type_t x) { switch (x) @@ -2392,7 +2392,7 @@ BAGTYPE (gnutls_pkcs12_bag_type_t x) } } -void +static void print_bag_data (gnutls_pkcs12_bag_t bag) { int result; @@ -548,7 +548,7 @@ handle_error (socket_st * hd, int err) int starttls_alarmed = 0; -void +static void starttls_alarm (int signum) { starttls_alarmed = 1; diff --git a/src/common.c b/src/common.c index ae7569ed61..59e8360aad 100644 --- a/src/common.c +++ b/src/common.c @@ -81,7 +81,7 @@ my_ctime (const time_t * tv) } -void +static void print_x509_info (gnutls_session_t session, const char *hostname, int insecure) { gnutls_x509_crt_t crt; @@ -281,7 +281,7 @@ print_x509_info (gnutls_session_t session, const char *hostname, int insecure) #ifdef ENABLE_OPENPGP -void +static void print_openpgp_info (gnutls_session_t session, const char *hostname, int insecure) { @@ -401,7 +401,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname, #endif -void +static void print_cert_vrfy (gnutls_session_t session) { int rc; @@ -443,7 +443,7 @@ print_cert_vrfy (gnutls_session_t session) } } -void +static void print_dh_info (gnutls_session_t session, const char *str) { printf ("- %sDiffie-Hellman parameters\n", str); diff --git a/src/crypt.c b/src/crypt.c index 884f330d7e..93944dbca6 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -108,7 +108,7 @@ print_num (const char *msg, const gnutls_datum_t * num) } -int +static int generate_create_conf (char *tpasswd_conf) { FILE *fd; @@ -320,7 +320,7 @@ find_strchr (char *username, char *file) /* Parses the tpasswd files, in order to verify the given * username/password pair. */ -int +static int verify_passwd (char *conffile, char *tpasswd, char *username, const char *passwd) { @@ -494,7 +494,7 @@ main (int argc, char **argv) } -char * +static char * _srp_crypt (const char *username, const char *passwd, int salt_size, const gnutls_datum_t * g, const gnutls_datum_t * n) { diff --git a/src/prime.c b/src/prime.c index f38d0aaf1a..213f31287e 100644 --- a/src/prime.c +++ b/src/prime.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004,2005,2007 Free Software Foundation + * Copyright (C) 2004,2005,2007,2008 Free Software Foundation * Copyright (C) 2001,2002,2003 Nikos Mavrogiannopoulos * * This file is part of GNUTLS. @@ -174,7 +174,6 @@ generate_prime (int bits, int how) if (!cparams) { /* generate a PKCS#3 structure */ - int ret; size_t len = buffer_size; ret = gnutls_dh_params_export_pkcs3 (dh_params, GNUTLS_X509_FMT_PEM, diff --git a/src/printlist.c b/src/printlist.c index 4655d3b746..b29c4af807 100644 --- a/src/printlist.c +++ b/src/printlist.c @@ -29,7 +29,7 @@ #include <time.h> #include <common.h> -int main() +int main(void) { { size_t i; diff --git a/src/serv.c b/src/serv.c index e765a07a05..f1db6f428a 100644 --- a/src/serv.c +++ b/src/serv.c @@ -364,7 +364,7 @@ oprfi_callback (gnutls_session_t session, } #endif -gnutls_session_t +static gnutls_session_t initialize_session (void) { gnutls_session_t session; @@ -447,7 +447,7 @@ static const char DEFAULT_DATA[] = /* Creates html with the current session information. */ #define tmp2 &http_buffer[strlen(http_buffer)] -char * +static char * peer_print_info (gnutls_session_t session, int *ret_length, const char *header) { @@ -480,7 +480,6 @@ peer_print_info (gnutls_session_t session, int *ret_length, { const gnutls_datum_t *cert_list; unsigned int cert_list_size = 0; - size_t i; cert_list = gnutls_certificate_get_peers (session, &cert_list_size); @@ -746,7 +745,7 @@ unimplemented: *response_length = ((*response) ? strlen (*response) : 0); } -void +static void terminate (int sig) { fprintf (stderr, "Exiting via signal %d\n", sig); diff --git a/src/tests.c b/src/tests.c index 0c56328d40..bec67ecc04 100644 --- a/src/tests.c +++ b/src/tests.c @@ -53,7 +53,7 @@ static size_t session_data_size = 0, session_id_size = 0; static int sfree = 0; static int handshake_output = 0; -int +static int do_handshake (gnutls_session_t session) { int ret, alert; @@ -479,7 +479,7 @@ test_ssl3 (gnutls_session_t session) } static int alrm = 0; -void +static void got_alarm (int k) { alrm = 1; diff --git a/src/tls_test.c b/src/tls_test.c index 7354d19b8d..876a3fd76d 100644 --- a/src/tls_test.c +++ b/src/tls_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000,2001,2002,2003,2006,2007 Nikos Mavrogiannopoulos + * Copyright (C) 2000,2001,2002,2003,2006,2007,2008 Nikos Mavrogiannopoulos * Copyright (C) 2004,2005, 2008 Free Software Foundation * * This file is part of GNUTLS. |