From: Jonathan McDowell Date: Tue, 18 Oct 2011 04:53:03 +0000 (-0700) Subject: Clean up "set but not used" GCC warnings X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/33cfd5887ea8d05241b5b4749abbf7fdfadb51fe?hp=c729b95a80e36514184cdd496774bb1d47fcc08f 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. --- 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 );