mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Fixed set but unused variable bugs
This commit is contained in:
parent
14442d2be0
commit
816bee1fa0
23 changed files with 84 additions and 80 deletions
|
@ -1,3 +1,14 @@
|
|||
2011-08-10 Werner Koch <wk@g10code.com>
|
||||
|
||||
* export.c (transfer_format_to_openpgp): Don't parse unneeded CSUM.
|
||||
|
||||
* import.c (import_secret_one): Use arg OPTIONS instead of global
|
||||
import options var.
|
||||
|
||||
* sig-check.c (do_check): Remove unused var CTX.
|
||||
|
||||
* build-packet.c (do_user_id): Return value.
|
||||
|
||||
2011-07-29 Werner Koch <wk@g10code.com>
|
||||
|
||||
* tdbio.c (open_db): Do not print read-only warning in quiet mode.
|
||||
|
|
|
@ -242,19 +242,19 @@ write_fake_data (IOBUF out, gcry_mpi_t a)
|
|||
static int
|
||||
do_user_id( IOBUF out, int ctb, PKT_user_id *uid )
|
||||
{
|
||||
int rc;
|
||||
int rc;
|
||||
|
||||
if( uid->attrib_data )
|
||||
{
|
||||
write_header(out, ctb, uid->attrib_len);
|
||||
rc = iobuf_write( out, uid->attrib_data, uid->attrib_len );
|
||||
}
|
||||
else
|
||||
{
|
||||
write_header2( out, ctb, uid->len, 2 );
|
||||
rc = iobuf_write( out, uid->name, uid->len );
|
||||
}
|
||||
return 0;
|
||||
if (uid->attrib_data)
|
||||
{
|
||||
write_header(out, ctb, uid->attrib_len);
|
||||
rc = iobuf_write( out, uid->attrib_data, uid->attrib_len );
|
||||
}
|
||||
else
|
||||
{
|
||||
write_header2( out, ctb, uid->len, 2 );
|
||||
rc = iobuf_write( out, uid->name, uid->len );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
|
26
g10/export.c
26
g10/export.c
|
@ -377,7 +377,6 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk)
|
|||
u32 s2k_count = 0;
|
||||
size_t npkey, nskey;
|
||||
gcry_mpi_t skey[10]; /* We support up to 9 parameters. */
|
||||
u16 desired_csum;
|
||||
int skeyidx = 0;
|
||||
struct seckey_info *ski;
|
||||
|
||||
|
@ -509,20 +508,21 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk)
|
|||
skey[skeyidx++] = NULL;
|
||||
|
||||
gcry_sexp_release (list);
|
||||
list = gcry_sexp_find_token (top_list, "csum", 0);
|
||||
if (list)
|
||||
{
|
||||
string = gcry_sexp_nth_string (list, 1);
|
||||
if (!string)
|
||||
goto bad_seckey;
|
||||
desired_csum = strtoul (string, NULL, 10);
|
||||
xfree (string);
|
||||
}
|
||||
else
|
||||
desired_csum = 0;
|
||||
|
||||
/* We have no need for the CSUM valuel thus we don't parse it. */
|
||||
/* list = gcry_sexp_find_token (top_list, "csum", 0); */
|
||||
/* if (list) */
|
||||
/* { */
|
||||
/* string = gcry_sexp_nth_string (list, 1); */
|
||||
/* if (!string) */
|
||||
/* goto bad_seckey; */
|
||||
/* desired_csum = strtoul (string, NULL, 10); */
|
||||
/* xfree (string); */
|
||||
/* } */
|
||||
/* else */
|
||||
/* desired_csum = 0; */
|
||||
/* gcry_sexp_release (list); list = NULL; */
|
||||
|
||||
gcry_sexp_release (list); list = NULL;
|
||||
gcry_sexp_release (top_list); top_list = NULL;
|
||||
|
||||
/* log_debug ("XXX is_v4=%d\n", is_v4); */
|
||||
|
|
|
@ -1596,7 +1596,7 @@ import_secret_one (ctrl_t ctrl, const char *fname, KBNODE keyblock,
|
|||
public key block, and below we will output another one for
|
||||
the secret keys. FIXME? */
|
||||
import_one (ctrl, fname, pub_keyblock, stats,
|
||||
NULL, NULL, opt.import_options, 1);
|
||||
NULL, NULL, options, 1);
|
||||
|
||||
/* Fixme: We should check for an invalid keyblock and
|
||||
cancel the secret key import in this case. */
|
||||
|
|
|
@ -2683,7 +2683,6 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker,
|
|||
KBNODE node;
|
||||
int i;
|
||||
int do_warn = 0;
|
||||
byte pk_version = 0;
|
||||
PKT_public_key *primary = NULL;
|
||||
|
||||
if (opt.with_colons)
|
||||
|
@ -2719,7 +2718,6 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker,
|
|||
do_warn = 1;
|
||||
}
|
||||
|
||||
pk_version = pk->version;
|
||||
primary = pk;
|
||||
}
|
||||
|
||||
|
|
|
@ -263,7 +263,6 @@ do_check( PKT_public_key *pk, PKT_signature *sig, gcry_md_hd_t digest,
|
|||
{
|
||||
gcry_mpi_t result = NULL;
|
||||
int rc = 0;
|
||||
struct cmp_help_context_s ctx;
|
||||
|
||||
if( (rc=do_check_messages(pk,sig,r_expired,r_revoked)) )
|
||||
return rc;
|
||||
|
@ -316,8 +315,6 @@ do_check( PKT_public_key *pk, PKT_signature *sig, gcry_md_hd_t digest,
|
|||
result = encode_md_value (pk, digest, sig->digest_algo );
|
||||
if (!result)
|
||||
return G10ERR_GENERAL;
|
||||
ctx.sig = sig;
|
||||
ctx.md = digest;
|
||||
rc = pk_verify( pk->pubkey_algo, result, sig->data, pk->pkey );
|
||||
gcry_mpi_release (result);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue