From: Julien Danjou Date: Fri, 17 Nov 2006 11:28:37 +0000 (+0100) Subject: Fix compilation warnings in crypt-gpgme.c, cryptglue.c and pgpkey.c X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=5fc6c3e42b91af11aa1323f6cfde4d27bbea9ec8 Fix compilation warnings in crypt-gpgme.c, cryptglue.c and pgpkey.c - Remove commented and dead code - Include own header files Signed-off-by: Julien Danjou Signed-off-by: Pierre Habouzit --- diff --git a/lib-crypt/crypt-gpgme.c b/lib-crypt/crypt-gpgme.c index 428b872..c5c6986 100644 --- a/lib-crypt/crypt-gpgme.c +++ b/lib-crypt/crypt-gpgme.c @@ -42,6 +42,7 @@ #include "pager.h" #include "recvattach.h" #include "sort.h" +#include "crypt-gpgme.h" /* * Helper macros. @@ -3502,7 +3503,7 @@ static crypt_key_t *crypt_getkeybyaddr (address_t * a, short abilities, } -static crypt_key_t *crypt_getkeybystr (char *p, short abilities, +static crypt_key_t *crypt_getkeybystr (const char *p, short abilities, unsigned int app, int *forced_valid) { string_list_t *hints = NULL; @@ -3616,7 +3617,8 @@ static crypt_key_t *crypt_ask_for_key (char *tag, static char *find_keys (address_t * to, address_t * cc, address_t * bcc, unsigned int app) { - char *keyID, *keylist = NULL, *t; + char *keylist = NULL, *t; + const char *keyID; ssize_t keylist_size = 0; ssize_t keylist_used = 0; address_t *tmp = NULL, *addr = NULL; @@ -3676,13 +3678,8 @@ static char *find_keys (address_t * to, address_t * cc, address_t * bcc, q = addr; } else { -#if 0 - k_info = crypt_getkeybystr (keyID, KEYFLAG_CANENCRYPT, - *r_application, &forced_valid); -#else k_info = crypt_getkeybystr (keyID, KEYFLAG_CANENCRYPT, app, &forced_valid); -#endif } } else if (r == -1) { @@ -3699,11 +3696,7 @@ static char *find_keys (address_t * to, address_t * cc, address_t * bcc, snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox); if ((key = crypt_ask_for_key (buf, q->mailbox, KEYFLAG_CANENCRYPT, -#if 0 - *r_application, -#else app, -#endif &forced_valid)) == NULL) { p_delete(&keylist); address_list_wipe(&tmp); @@ -3717,13 +3710,6 @@ static char *find_keys (address_t * to, address_t * cc, address_t * bcc, { const char *s = crypt_fpr (key); -#if 0 - if (key->flags & KEYFLAG_ISX509) - *r_application &= ~APPLICATION_PGP; - if (!(key->flags & KEYFLAG_ISX509)) - *r_application &= ~APPLICATION_SMIME; -#endif - keylist_size += m_strlen(s) + 4 + 1; p_realloc(&keylist, keylist_size); sprintf (keylist + keylist_used, "%s0x%s%s", /* __SPRINTF_CHECKED__ */ @@ -3817,11 +3803,6 @@ static int gpgme_send_menu (HEADER * msg, int *redraw, int is_smime) msg->security |= (is_smime ? SMIMESIGN : PGPSIGN); } -#if 0 - else { - msg->security &= (is_smime ? ~SMIMESIGN : ~PGPSIGN); - } -#endif *redraw = REDRAW_FULL; break;