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

Fixed set but unused variable bugs

This commit is contained in:
Werner Koch 2011-08-10 14:11:30 +02:00
parent 14442d2be0
commit 816bee1fa0
23 changed files with 84 additions and 80 deletions

View file

@ -1,3 +1,11 @@
2011-08-10 Werner Koch <wk@g10code.com>
* genkey.c (check_passphrase_pattern): Use gpg_strerror instead of
strerror.
* command-ssh.c (ssh_receive_mpint_list): Remove unused var
ELEMS_PUBLIC_N.
* gpg-agent.c (main): Remove unused var MAY_COREDUMP.
2011-08-09 Ben Kibbey <bjk@luxsci.net>
* command.c (option_handler): Have option s2k-count match the

View file

@ -933,7 +933,6 @@ static gpg_error_t
ssh_receive_mpint_list (estream_t stream, int secret,
ssh_key_type_spec_t key_spec, gcry_mpi_t **mpi_list)
{
unsigned int elems_public_n;
const char *elems_public;
unsigned int elems_n;
const char *elems;
@ -952,7 +951,6 @@ ssh_receive_mpint_list (estream_t stream, int secret,
elems_n = strlen (elems);
elems_public = key_spec.elems_key_public;
elems_public_n = strlen (elems_public);
mpis = xtrycalloc (elems_n + 1, sizeof *mpis );
if (!mpis)

View file

@ -106,7 +106,7 @@ check_passphrase_pattern (ctrl_t ctrl, const char *pw)
if (!infp)
{
err = gpg_error_from_syserror ();
log_error (_("error creating temporary file: %s\n"), strerror (errno));
log_error (_("error creating temporary file: %s\n"), gpg_strerror (err));
return 1; /* Error - assume password should not be used. */
}
@ -114,7 +114,7 @@ check_passphrase_pattern (ctrl_t ctrl, const char *pw)
{
err = gpg_error_from_syserror ();
log_error (_("error writing to temporary file: %s\n"),
strerror (errno));
gpg_strerror (err));
fclose (infp);
return 1; /* Error - assume password should not be used. */
}

View file

@ -568,7 +568,6 @@ main (int argc, char **argv )
{
ARGPARSE_ARGS pargs;
int orig_argc;
int may_coredump;
char **orig_argv;
FILE *configfp = NULL;
char *configname = NULL;
@ -642,7 +641,7 @@ main (int argc, char **argv )
setup_libgcrypt_logging ();
gcry_control (GCRYCTL_USE_SECURE_RNDPOOL);
may_coredump = disable_core_dumps ();
disable_core_dumps ();
/* Set default options. */
parse_rereadable_options (NULL, 0); /* Reset them to default values. */