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
Hi David,
On 7/28/11 3:33 PM, David Fifield wrote:
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?
Hmm, for some reason I don't get those errors (or warnings) about unused variables. But I think you're right in that these variables can go away.
This is Steven's code, so I'd like to hear his opinion before applying the patch. Steven?
Best, Karsten
Hi Karsten, David,
On 29 Jul 2011, at 05:00, Karsten Loesing wrote:
Hmm, for some reason I don't get those errors (or warnings) about unused variables. But I think you're right in that these variables can go away.
This is Steven's code, so I'd like to hear his opinion before applying the patch. Steven?
That patch looks fine to me. I didn't get the warnings either, so perhaps you're using a newer GCC.
While I was testing it, I also wrote a patch to fix compilation on MacOS X.
Steven.
On Fri, Jul 29, 2011 at 08:39:15PM +0100, Steven Murdoch wrote:
Hi Karsten, David,
On 29 Jul 2011, at 05:00, Karsten Loesing wrote:
Hmm, for some reason I don't get those errors (or warnings) about unused variables. But I think you're right in that these variables can go away.
This is Steven's code, so I'd like to hear his opinion before applying the patch. Steven?
That patch looks fine to me. I didn't get the warnings either, so perhaps you're using a newer GCC.
I've only started seeing those warnings since GCC 4.6. I noticed some tor commits to fix similar things, for example https://gitweb.torproject.org/tor.git/commit/a5232e0c4c572cdff85701f698b8b90....
David Fifield
On 7/29/11 3:39 PM, Steven Murdoch wrote:
Hi Karsten, David,
On 29 Jul 2011, at 05:00, Karsten Loesing wrote:
Hmm, for some reason I don't get those errors (or warnings) about unused variables. But I think you're right in that these variables can go away.
This is Steven's code, so I'd like to hear his opinion before applying the patch. Steven?
That patch looks fine to me. I didn't get the warnings either, so perhaps you're using a newer GCC.
While I was testing it, I also wrote a patch to fix compilation on MacOS X.
I applied both David's and Steven's patch.
Thanks, Karsten