g10: Avoid undefined behavior.
authorJustus Winter <justus@g10code.com>
Thu, 19 Nov 2015 14:48:01 +0000 (15:48 +0100)
committerJustus Winter <justus@g10code.com>
Thu, 19 Nov 2015 14:48:01 +0000 (15:48 +0100)
* g10/trust.c (clean_one_uid): Avoid a computation involving an
uninitialized value.
--
Found using the Clang Static Analyzer.

Signed-off-by: Justus Winter <justus@g10code.com>
g10/trust.c

index a89b0e5..f46aeea 100644 (file)
@@ -704,7 +704,7 @@ void
 clean_one_uid (kbnode_t keyblock, kbnode_t uidnode, int noisy, int self_only,
                int *uids_cleaned, int *sigs_cleaned)
 {
-  int dummy;
+  int dummy = 0;
 
   assert (keyblock->pkt->pkttype==PKT_PUBLIC_KEY);
   assert (uidnode->pkt->pkttype==PKT_USER_ID);