From 74330a49ecaf8f191de2792fece7ab6fe6e26331 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 17 Dec 2004 18:51:32 +0000 Subject: [PATCH] * passphrase.c (agent_get_passphrase): Define NREAD locally as size_t or int. * keylist.c (list_keyblock_print): Make field width an int. * keyedit.c (show_key_with_all_names): Ditto. --- g10/ChangeLog | 8 ++++++++ g10/keyedit.c | 2 +- g10/keylist.c | 2 +- g10/passphrase.c | 4 +++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index e1eb5cd2a..a6b092b29 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,11 @@ +2004-12-17 Werner Koch + + * passphrase.c (agent_get_passphrase): Define NREAD locally as + size_t or int. + + * keylist.c (list_keyblock_print): Make field width an int. + * keyedit.c (show_key_with_all_names): Ditto. + 2004-12-16 David Shaw * g10.c (main): Add --require-secmem/--no-require-secmem to cause diff --git a/g10/keyedit.c b/g10/keyedit.c index 0fab9c85c..0e3ec69bc 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -2344,7 +2344,7 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, { if(opt.trust_model!=TM_ALWAYS) { - tty_printf("%*s",keystrlen()+13,""); + tty_printf("%*s", (int)keystrlen()+13,""); /* Ownertrust is only meaningful for the PGP or classic trust models */ if(opt.trust_model==TM_PGP || opt.trust_model==TM_CLASSIC) diff --git a/g10/keylist.c b/g10/keylist.c index bb67e8e50..dc4e86793 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -787,7 +787,7 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) printf("uid%*s%s ",indent,"",validity); } else - printf("uid%*s",keystrlen()+10,""); + printf("uid%*s", (int)keystrlen()+10,""); print_utf8_string( stdout, uid->name, uid->len ); putchar('\n'); diff --git a/g10/passphrase.c b/g10/passphrase.c index 594fa335b..1a477288d 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -643,7 +643,6 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *tryagain_text, char *atext = NULL; char buf[50]; int fd = -1; - int nread; u32 reply; char *pw = NULL; PKT_public_key *pk = m_alloc_clear( sizeof *pk ); @@ -742,6 +741,8 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *tryagain_text, if (!prot) { /* old style protocol */ + size_t nread; + n = 4 + 20 + strlen (atext); u32tobuf (buf, n ); u32tobuf (buf+4, GPGA_PROT_GET_PASSPHRASE ); @@ -814,6 +815,7 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *tryagain_text, } else { /* The new Assuan protocol */ + int nread; char *line, *p; const unsigned char *s; int i;