summaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-23 17:04:38 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-23 17:04:38 -0400
commita5232e0c4c572cdff85701f698b8b90c9443d7e4 (patch)
tree1bc0db8feaa3a808518b5c277481eefacb984277 /src/or/eventdns.c
parent57810c333a38c72c1e361c02e31de7712d1f221a (diff)
downloadtor-a5232e0c4c572cdff85701f698b8b90c9443d7e4.tar.gz
tor-a5232e0c4c572cdff85701f698b8b90c9443d7e4.zip
Fix GCC 4.6's new -Wunused-but-set-variable warnings.
Most instances were dead code; for those, I removed the assignments. Some were pieces of info we don't currently plan to use, but which we might in the future. For those, I added an explicit cast-to-void to indicate that we know that the thing's unused. Finally, one was a case where we were testing the wrong variable in a unit test. That one I fixed. This resolves bug 3208.
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r--src/or/eventdns.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index fc005df2d7..b7cc2929ae 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -1028,6 +1028,9 @@ request_parse(u8 *packet, ssize_t length, struct evdns_server_port *port, struct
GET16(answers);
GET16(authority);
GET16(additional);
+ (void)additional;
+ (void)authority;
+ (void)answers;
if (flags & 0x8000) return -1; /* Must not be an answer. */
flags &= 0x0110; /* Only RD and CD get preserved. */