aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyring.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-01-07 18:01:18 +0000
committerWerner Koch <[email protected]>2016-01-07 18:09:16 +0000
commit008aa6e6d4b213c3a0d15509eb46cf168b6f2c94 (patch)
tree108e4e0d20a00d780fe864b1d40c2890cb9d9527 /g10/keyring.c
parentsm: Avoid warnings about useless assignments. (diff)
downloadgnupg-008aa6e6d4b213c3a0d15509eb46cf168b6f2c94.tar.gz
gnupg-008aa6e6d4b213c3a0d15509eb46cf168b6f2c94.zip
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 <[email protected]>
Diffstat (limited to 'g10/keyring.c')
-rw-r--r--g10/keyring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/keyring.c b/g10/keyring.c
index 0f1e058e6..4dc7e0a88 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -1508,6 +1508,8 @@ keyring_rebuild_cache (void *token,int noisy)
* the original file is closed */
tmpfp = NULL;
}
+ /* Static analyzer note: BAKFILENAME is never NULL here
+ because it is controlled by LASTRESNAME. */
rc = lastresname? rename_tmp_file (bakfilename, tmpfilename,
lastresname) : 0;
xfree (tmpfilename); tmpfilename = NULL;
@@ -1720,7 +1722,6 @@ do_copy (int mode, const char *fname, KBNODE root,
iobuf_cancel(newfp);
goto leave;
}
- rc = 0;
}
if( mode == 2 || mode == 3 ) { /* delete or update */
@@ -1764,7 +1765,6 @@ do_copy (int mode, const char *fname, KBNODE root,
iobuf_cancel(newfp);
goto leave;
}
- rc = 0;
}
/* close both files */