From 33cfd5887ea8d05241b5b4749abbf7fdfadb51fe Mon Sep 17 00:00:00 2001
From: Jonathan McDowell <noodles@earth.li>
Date: Mon, 17 Oct 2011 21:53:03 -0700
Subject: [PATCH] Clean up "set but not used" GCC warnings

  GCC 4.6 now errors when a variable is set but not used; clean up
  instances of this to fix compilation.
---
 gpgwww.c    | 3 +--
 splitkeys.c | 3 +--
 stripkey.c  | 7 +++----
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/gpgwww.c b/gpgwww.c
index 3b35ad7..84f00e4 100644
--- a/gpgwww.c
+++ b/gpgwww.c
@@ -69,7 +69,6 @@ int getkeyspath(uint64_t have, uint64_t want, int count)
 	struct openpgp_packet_list *list_end = NULL;
 	struct stats_key *keyinfoa, *keyinfob, *curkey;
 	uint64_t fullhave, fullwant;
-	int rec;
 	int pathlen = 0;
 
 	fullhave = config.dbbackend->getfullkeyid(have);
@@ -93,7 +92,7 @@ int getkeyspath(uint64_t have, uint64_t want, int count)
 		 * Fill the tree info up.
 		 */
 		initcolour(true);
-		rec = findpath(keyinfoa, keyinfob);
+		findpath(keyinfoa, keyinfob);
 		keyinfob->parent = 0;
 		if (keyinfoa->colour == 0) {
 			pathlen = count;
diff --git a/splitkeys.c b/splitkeys.c
index fdc20a2..76aa4e4 100644
--- a/splitkeys.c
+++ b/splitkeys.c
@@ -36,7 +36,6 @@ int main(int argc, char *argv[])
 	struct openpgp_packet_list	*packets = NULL;
 	struct openpgp_packet_list	*list_end = NULL;
 	struct openpgp_packet_list	*tmp = NULL;
-	int				 result = 0;
 	int				 maxkeys = 10000;
 	int				 outfd = -1;
 	int				 count = 0;
@@ -56,7 +55,7 @@ int main(int argc, char *argv[])
 	initlogthing("splitkeys", config.logfile);
 
 	do {
-		result = read_openpgp_stream(stdin_getchar, NULL,
+		read_openpgp_stream(stdin_getchar, NULL,
 				 &packets, maxkeys);
 		if (packets != NULL) {
 			list_end = packets;
diff --git a/stripkey.c b/stripkey.c
index cefab42..414c163 100644
--- a/stripkey.c
+++ b/stripkey.c
@@ -47,7 +47,6 @@ int main(int argc, char** argv) {
   struct openpgp_signedpacket_list *uid = NULL;
   struct openpgp_packet_list *sig = NULL;
   struct openpgp_packet_list *prevsig = NULL;
-  int result = 0;
   uint64_t my_key = 0;
 
   if( argc > 1 )
@@ -57,11 +56,11 @@ int main(int argc, char** argv) {
   /* strip each key of everything but its pubkey component, uids and
    * selfsigs and revsigs on those selfsigs */
 
-  result = read_openpgp_stream( stdin_getchar, NULL, &packets, 0 );
-  result = parse_keys( packets, &keys );
+  read_openpgp_stream( stdin_getchar, NULL, &packets, 0 );
+  parse_keys( packets, &keys );
   free_packet_list(packets);
   packets = NULL;
-  result = cleankeys( keys );
+  cleankeys( keys );
   /* Iterate over the keys... */
   for( key = keys; key; key = key->next ) {
     uint64_t keyid = get_keyid( key );
-- 
2.39.5