[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-dev] Unused -v and -F options in torperf/trivsocks-client?



Running "make" in torperf, I get errors about unused variables:

$ make
gcc -Wall -Werror -ggdb -c trivsocks-client.c
trivsocks-client.c: In function âmainâ:
trivsocks-client.c:452:51: error: variable âforceâ set but not used [-Werror=unused-but-set-variable]
trivsocks-client.c:452:21: error: variable âisVerboseâ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make: *** [trivsocks-client.o] Error 1

The variables have to do with the -v and -F options, which appear not to
do anything. This patch removes the options, but is it intentional?

David Fifield
From 57b03530ba40e2c24d07daaa38d2b42295b49d8b Mon Sep 17 00:00:00 2001
From: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Thu, 28 Jul 2011 19:17:59 +0000
Subject: [PATCH] Remove unused command-line options -v and -F.

---
 trivsocks-client.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/trivsocks-client.c b/trivsocks-client.c
index 1c3d895..70e29a7 100644
--- a/trivsocks-client.c
+++ b/trivsocks-client.c
@@ -449,7 +449,7 @@ main(int argc, char **argv)
 {
   uint32_t sockshost;
   uint16_t socksport;
-  int isSocks4 = 0, isVerbose = 0, isReverse = 0, force = 0;
+  int isSocks4 = 0, isReverse = 0;
   char **arg;
   int n_args;
   uint32_t result = 0;
@@ -470,16 +470,12 @@ main(int argc, char **argv)
   }
 
   while (n_args && *arg[0] == '-') {
-    if (!strcmp("-v", arg[0]))
-      isVerbose = 1;
-    else if (!strcmp("-4", arg[0]))
+    if (!strcmp("-4", arg[0]))
       isSocks4 = 1;
     else if (!strcmp("-5", arg[0]))
       isSocks4 = 0;
     else if (!strcmp("-x", arg[0]))
       isReverse = 1;
-    else if (!strcmp("-F", arg[0]))
-      force = 1;
     else {
       fprintf(stderr, "Unrecognized flag '%s'\n", arg[0]);
       usage();
-- 
1.7.6

_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev