mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
gpg: Silence warnings found by static analyzer.
* g10/keyedit.c (change_passphrase): Remove useless init of ANY. (keyedit_quick_adduid): Remove useless setting of ERR. * g10/parse-packet.c (parse_key): Remove PKTLEN from condition because it has been checked before the loop. (parse_plaintext): Remove useless init of PKTLEN. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
7990586828
commit
09accc0e3d
@ -1195,7 +1195,7 @@ change_passphrase (ctrl_t ctrl, kbnode_t keyblock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Change the passphrase for all keys. */
|
/* Change the passphrase for all keys. */
|
||||||
for (any = 0, node = keyblock; node; node = node->next)
|
for (node = keyblock; node; node = node->next)
|
||||||
{
|
{
|
||||||
if (node->pkt->pkttype == PKT_PUBLIC_KEY
|
if (node->pkt->pkttype == PKT_PUBLIC_KEY
|
||||||
|| node->pkt->pkttype == PKT_PUBLIC_SUBKEY)
|
|| node->pkt->pkttype == PKT_PUBLIC_SUBKEY)
|
||||||
@ -2391,7 +2391,7 @@ keyedit_quick_adduid (ctrl_t ctrl, const char *username, const char *newuid)
|
|||||||
kdbhd = keydb_new ();
|
kdbhd = keydb_new ();
|
||||||
if (!kdbhd)
|
if (!kdbhd)
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
/* Note that keydb_new has already used log_error. */
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2428,7 +2428,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
err = gpg_error (GPG_ERR_INV_PACKET);
|
err = gpg_error (GPG_ERR_INV_PACKET);
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
for (i = 0; i < ski->ivlen && pktlen; i++, pktlen--)
|
for (i = 0; i < ski->ivlen; i++, pktlen--)
|
||||||
temp[i] = iobuf_get_noeof (inp);
|
temp[i] = iobuf_get_noeof (inp);
|
||||||
if (list_mode)
|
if (list_mode)
|
||||||
{
|
{
|
||||||
@ -2862,7 +2862,6 @@ parse_plaintext (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
pktlen -= 4;
|
pktlen -= 4;
|
||||||
pt->len = pktlen;
|
pt->len = pktlen;
|
||||||
pt->buf = inp;
|
pt->buf = inp;
|
||||||
pktlen = 0;
|
|
||||||
|
|
||||||
if (list_mode)
|
if (list_mode)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user