1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Fix warnings about useless assignments.

* g10/armor.c (parse_hash_header): Remove duplicate var assignment.
* g10/getkey.c (cache_user_id): Ditto.
* g10/keygen.c (ask_curve): Ditto.  This also fixes a small memory
leak.

* g10/keygen.c (proc_parameter_file): Remove useless assignment or
pointer increment.
(generate_keypair): Ditto.
* g10/getkey.c (finish_lookup, lookup): Ditto.
* g10/card-util.c (change_pin): Ditto.
* g10/gpg.c (main) <aVerify>: Ditto.
* g10/import.c (import): Ditto.
(print_import_check): Ditto
* g10/keyring.c (do_copy): Ditto.
* g10/tdbio.c (tdbio_read_record): Ditto.
* g10/trustdb.c (tdb_update_ownertrust): Ditto.
(update_validity): Ditto.

* g10/server.c (cmd_passwd): Remove useless call to skip_options.

--

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-01-07 19:01:18 +01:00
parent 126aebbb82
commit 008aa6e6d4
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
10 changed files with 30 additions and 30 deletions

View file

@ -2242,10 +2242,7 @@ ask_curve (int *algo, int *subkey_algo)
&& curves[idx].fix_curve)
{
if (subkey_algo && *subkey_algo == PUBKEY_ALGO_ECDSA)
{
*subkey_algo = PUBKEY_ALGO_EDDSA;
result = xstrdup ("Ed25519");
}
*subkey_algo = PUBKEY_ALGO_EDDSA;
*algo = PUBKEY_ALGO_EDDSA;
result = xstrdup ("Ed25519");
}
@ -3122,6 +3119,7 @@ proc_parameter_file (ctrl_t ctrl, struct para_data_s *para, const char *fname,
}
else
{
r = get_parameter (para, pKEYSERVER);
log_error("%s:%d: invalid keyserver url\n", fname, r->lnr );
return -1;
}
@ -3706,7 +3704,6 @@ generate_keypair (ctrl_t ctrl, int full, const char *fname,
|| algo == PUBKEY_ALGO_ECDH)
{
curve = ask_curve (&algo, NULL);
nbits = 0;
r = xmalloc_clear (sizeof *r + strlen (curve));
r->key = pKEYCURVE;
strcpy (r->u.value, curve);