From: Julien Danjou Date: Fri, 17 Nov 2006 11:28:33 +0000 (+0100) Subject: Fix compilation warnings in pgp.c X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=a16b0e24a0e811e35943c9f2d553a02d156d4961 Fix compilation warnings in pgp.c - Fix pointer argument in address_list_uniq() - Use const char in pgp_getkeybystr() Signed-off-by: Julien Danjou Signed-off-by: Pierre Habouzit --- diff --git a/lib-crypt/pgp.c b/lib-crypt/pgp.c index d729bcf..b29d35b 100644 --- a/lib-crypt/pgp.c +++ b/lib-crypt/pgp.c @@ -990,7 +990,8 @@ static short is_numerical_keyid (const char *s) */ char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc) { - char *keyID, *keylist = NULL, *t; + char *keylist = NULL, *t; + const char *keyID; size_t keylist_size = 0; size_t keylist_used = 0; address_t *tmp = NULL, *addr = NULL; diff --git a/lib-crypt/pgp.h b/lib-crypt/pgp.h index db5f59b..1b544ee 100644 --- a/lib-crypt/pgp.h +++ b/lib-crypt/pgp.h @@ -36,7 +36,7 @@ int pgp_decrypt_mime (FILE *, FILE **, BODY *, BODY **); pgp_key_t pgp_ask_for_key (char *, char *, short, pgp_ring_t); pgp_key_t pgp_get_candidates (pgp_ring_t, string_list_t *); pgp_key_t pgp_getkeybyaddr (address_t *, short, pgp_ring_t); -pgp_key_t pgp_getkeybystr (char *, short, pgp_ring_t); +pgp_key_t pgp_getkeybystr (const char *, short, pgp_ring_t); char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc); diff --git a/lib-crypt/pgpkey.c b/lib-crypt/pgpkey.c index e5686a5..637e322 100644 --- a/lib-crypt/pgpkey.c +++ b/lib-crypt/pgpkey.c @@ -876,7 +876,7 @@ pgp_key_t pgp_getkeybyaddr (address_t * a, short abilities, pgp_ring_t keyring) return NULL; } -pgp_key_t pgp_getkeybystr (char *p, short abilities, pgp_ring_t keyring) +pgp_key_t pgp_getkeybystr (const char *p, short abilities, pgp_ring_t keyring) { string_list_t *hints = NULL; pgp_key_t keys;