[Pkg-gnupg-commit] [gnupg2] 11/241: gpg: Silence two more warnings.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Dec 9 20:31:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit c2c400714854d5a127a6966200d345d0d6cfc7d4
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Oct 18 20:17:24 2015 +0200

    gpg: Silence two more warnings.
    
    * g10/trustdb.c (tdb_get_validity_core): Silence a warning.
    * g10/tofu.c (tofu_register): Move SIG_DIGEST computation to the top
    so that it is not uninitialized in case of an early error.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 g10/tofu.c    | 4 ++--
 g10/trustdb.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/g10/tofu.c b/g10/tofu.c
index 21a54bc..9b21d86 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -2096,6 +2096,8 @@ tofu_register (const byte *fingerprint_bin, const char *user_id,
   unsigned long c;
   int already_verified = 0;
 
+  sig_digest = make_radix64_string (sig_digest_bin, sig_digest_bin_len);
+
   dbs = opendbs ();
   if (! dbs)
     {
@@ -2128,8 +2130,6 @@ tofu_register (const byte *fingerprint_bin, const char *user_id,
     }
 
   /* Save the observed signature in the DB.  */
-  sig_digest = make_radix64_string (sig_digest_bin, sig_digest_bin_len);
-
   db = getdb (dbs, email, DB_EMAIL);
   if (! db)
     {
diff --git a/g10/trustdb.c b/g10/trustdb.c
index 170c041..f58051a 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -1003,7 +1003,7 @@ tdb_get_validity_core (PKT_public_key *pk, PKT_user_id *uid,
 
   if (opt.trust_model == TM_TOFU || opt.trust_model == TM_TOFU_PGP)
     {
-      kbnode_t user_id_node;
+      kbnode_t user_id_node = NULL; /* Silence -Wmaybe-uninitialized.  */
       int user_ids = 0;
       int user_ids_expired = 0;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list