Clean up "set but not used" GCC warnings
authorJonathan McDowell <noodles@earth.li>
Tue, 18 Oct 2011 04:53:03 +0000 (21:53 -0700)
committerJonathan McDowell <noodles@earth.li>
Tue, 18 Oct 2011 04:53:03 +0000 (21:53 -0700)
  GCC 4.6 now errors when a variable is set but not used; clean up
  instances of this to fix compilation.

gpgwww.c
splitkeys.c
stripkey.c

index 3b35ad7a5d9a9b7239be5ec4f1a7a59195173fef..84f00e4d70d9674cfc11f0c9babe1a112c714aca 100644 (file)
--- 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;
index fdc20a288dfb1250a5ce218ab647714fc495d98d..76aa4e4b9a439040c94e3e74bf54c7d667404352 100644 (file)
@@ -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;
index cefab42fe97479ce10e2856ce3b6857e36b4ee27..414c1633c939be58677370755098faa7d7d5110b 100644 (file)
@@ -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 );