From: Pierre Habouzit Date: Fri, 17 Nov 2006 12:19:35 +0000 (+0100) Subject: no warnings in lib-sys anymore X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=f65ae399906906f734398432691dbacf2c7bda9f;p=apps%2Fmadmutt.git no warnings in lib-sys anymore Signed-off-by: Pierre Habouzit --- diff --git a/lib-sys/filter.c b/lib-sys/filter.c index 75e21b8..90d9af2 100644 --- a/lib-sys/filter.c +++ b/lib-sys/filter.c @@ -8,6 +8,7 @@ */ #include +#include #include "mutt_signal.h" #include "unix.h" diff --git a/lib-sys/mutt_signal.c b/lib-sys/mutt_signal.c index 4807fa1..25cfe6e 100644 --- a/lib-sys/mutt_signal.c +++ b/lib-sys/mutt_signal.c @@ -20,7 +20,7 @@ static struct sigaction SysOldQuit; static int IsEndwin = 0; /* Attempt to catch "ordinary" signals and shut down gracefully. */ -RETSIGTYPE exit_handler (int sig) +static RETSIGTYPE exit_handler (int sig) { curs_set (1); endwin (); /* just to be safe */ @@ -40,12 +40,12 @@ RETSIGTYPE exit_handler (int sig) exit (0); } -RETSIGTYPE chld_handler(int sig __attribute__((unused))) +static RETSIGTYPE chld_handler(int sig __attribute__((unused))) { /* empty */ } -RETSIGTYPE sighandler (int sig) +static RETSIGTYPE sighandler (int sig) { int save_errno = errno; diff --git a/lib-sys/mutt_ssl_gnutls.c b/lib-sys/mutt_ssl_gnutls.c index cd48e19..dfac2ca 100644 --- a/lib-sys/mutt_ssl_gnutls.c +++ b/lib-sys/mutt_ssl_gnutls.c @@ -345,13 +345,13 @@ static int tls_compare_certificates (const gnutls_datum * peercert) static void tls_fingerprint (gnutls_digest_algorithm algo, char *s, int l, const gnutls_datum * data) { - unsigned char md[36]; + char md[36]; ssize_t n; int j; n = 36; - if (gnutls_fingerprint(algo, data, (char *) md, &n) < 0) { + if (gnutls_fingerprint(algo, data, md, (size_t *)&n) < 0) { snprintf (s, l, _("[unable to calculate]")); } else { @@ -583,34 +583,34 @@ static int tls_check_certificate (CONNECTION * conn) buflen = sizeof (dn_common_name); if (gnutls_x509_crt_get_dn_by_oid (cert, GNUTLS_OID_X520_COMMON_NAME, 0, 0, - dn_common_name, &buflen) != 0) + dn_common_name, (size_t *)&buflen) != 0) dn_common_name[0] = '\0'; buflen = sizeof (dn_email); if (gnutls_x509_crt_get_dn_by_oid (cert, GNUTLS_OID_PKCS9_EMAIL, 0, 0, - dn_email, &buflen) != 0) + dn_email, (size_t *)&buflen) != 0) dn_email[0] = '\0'; buflen = sizeof (dn_organization); if (gnutls_x509_crt_get_dn_by_oid (cert, GNUTLS_OID_X520_ORGANIZATION_NAME, 0, 0, dn_organization, - &buflen) != 0) + (size_t *)&buflen) != 0) dn_organization[0] = '\0'; buflen = sizeof (dn_organizational_unit); if (gnutls_x509_crt_get_dn_by_oid (cert, GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, 0, 0, - dn_organizational_unit, &buflen) != 0) + dn_organizational_unit, (size_t *)&buflen) != 0) dn_organizational_unit[0] = '\0'; buflen = sizeof (dn_locality); if (gnutls_x509_crt_get_dn_by_oid - (cert, GNUTLS_OID_X520_LOCALITY_NAME, 0, 0, dn_locality, &buflen) != 0) + (cert, GNUTLS_OID_X520_LOCALITY_NAME, 0, 0, dn_locality, (size_t *)&buflen) != 0) dn_locality[0] = '\0'; buflen = sizeof (dn_province); if (gnutls_x509_crt_get_dn_by_oid (cert, GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, 0, 0, dn_province, - &buflen) != 0) + (size_t *)&buflen) != 0) dn_province[0] = '\0'; buflen = sizeof (dn_country); if (gnutls_x509_crt_get_dn_by_oid (cert, GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, - dn_country, &buflen) != 0) + dn_country, (size_t *)&buflen) != 0) dn_country[0] = '\0'; snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, @@ -628,34 +628,34 @@ static int tls_check_certificate (CONNECTION * conn) buflen = sizeof (dn_common_name); if (gnutls_x509_crt_get_issuer_dn_by_oid - (cert, GNUTLS_OID_X520_COMMON_NAME, 0, 0, dn_common_name, &buflen) != 0) + (cert, GNUTLS_OID_X520_COMMON_NAME, 0, 0, dn_common_name, (size_t *)&buflen) != 0) dn_common_name[0] = '\0'; buflen = sizeof (dn_email); if (gnutls_x509_crt_get_issuer_dn_by_oid - (cert, GNUTLS_OID_PKCS9_EMAIL, 0, 0, dn_email, &buflen) != 0) + (cert, GNUTLS_OID_PKCS9_EMAIL, 0, 0, dn_email, (size_t *)&buflen) != 0) dn_email[0] = '\0'; buflen = sizeof (dn_organization); if (gnutls_x509_crt_get_issuer_dn_by_oid (cert, GNUTLS_OID_X520_ORGANIZATION_NAME, 0, 0, dn_organization, - &buflen) != 0) + (size_t *)&buflen) != 0) dn_organization[0] = '\0'; buflen = sizeof (dn_organizational_unit); if (gnutls_x509_crt_get_issuer_dn_by_oid (cert, GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, 0, 0, - dn_organizational_unit, &buflen) != 0) + dn_organizational_unit, (size_t *)&buflen) != 0) dn_organizational_unit[0] = '\0'; buflen = sizeof (dn_locality); if (gnutls_x509_crt_get_issuer_dn_by_oid - (cert, GNUTLS_OID_X520_LOCALITY_NAME, 0, 0, dn_locality, &buflen) != 0) + (cert, GNUTLS_OID_X520_LOCALITY_NAME, 0, 0, dn_locality, (size_t *)&buflen) != 0) dn_locality[0] = '\0'; buflen = sizeof (dn_province); if (gnutls_x509_crt_get_issuer_dn_by_oid (cert, GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, 0, 0, dn_province, - &buflen) != 0) + (size_t *)&buflen) != 0) dn_province[0] = '\0'; buflen = sizeof (dn_country); if (gnutls_x509_crt_get_issuer_dn_by_oid - (cert, GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, dn_country, &buflen) != 0) + (cert, GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, dn_country, (size_t *)&buflen) != 0) dn_country[0] = '\0'; snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name,