Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3208 closed defect (fixed)

new warnings with gcc 4.6

Reported by: weasel Owned by:
Priority: Medium Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor: 0.2.3.1-alpha
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

gcc 4.6 started to warn about set, but unused variables.

This is on a more or less recent master (May 16, 03ccce6d776c617d81837ae9cc1f33f45d154e92):

util.c: In function 'tor_spawn_background':
util.c:2968:11: warning: variable 'nbytes' set but not used [-Wunused-but-set-variable]
circuitbuild.c: In function 'entry_guards_compute_status':
circuitbuild.c:3785:7: warning: variable 'severity' set but not used [-Wunused-but-set-variable]
command.c: In function 'command_process_netinfo_cell':
command.c:567:12: warning: variable 'my_apparent_addr' set but not used [-Wunused-but-set-variable]
control.c: In function 'control_event_circuit_status':
control.c:3166:7: warning: variable 'providing_reason' set but not used [-Wunused-but-set-variable]
directory.c: In function 'connection_dir_client_reached_eof':
directory.c:2008:15: warning: variable 'rejected' set but not used [-Wunused-but-set-variable]
dirvote.c: In function 'networkstatus_compute_consensus':
dirvote.c:1588:27: warning: variable 'chosen_unnamed_idx' set but not used [-Wunused-but-set-variable]
eventdns.c: In function 'request_parse':
eventdns.c:1021:54: warning: variable 'additional' set but not used [-Wunused-but-set-variable]
eventdns.c:1021:43: warning: variable 'authority' set but not used [-Wunused-but-set-variable]
eventdns.c:1021:34: warning: variable 'answers' set but not used [-Wunused-but-set-variable]
test_crypto.c: In function 'test_crypto_rng':
test_crypto.c:58:10: warning: variable 'j' set but not used [-Wunused-but-set-variable]
test_crypto.c: In function 'test_crypto_sha':
test_crypto.c:233:7: warning: variable 'i' set but not used [-Wunused-but-set-variable]
tor-resolve.c: In function 'main':
tor-resolve.c:322:51: warning: variable 'force' set but not used [-Wunused-but-set-variable]

Cheers,

Child Tickets

Attachments (1)

text (60.9 KB) - added by weasel 9 years ago.
build log

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by weasel

Attachment: text added

build log

comment:1 Changed 9 years ago by nickm

Milestone: Tor: 0.2.2.x-final

comment:2 Changed 9 years ago by nickm

Status: newneeds_review

See branch bug3208 in my public repo.

comment:3 Changed 9 years ago by Sebastian

The fixes look good. They fix a good deal of the clang warnings too.

comment:4 Changed 9 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

excellent. Merging to 0.2.2 and master. "Thwunk"

comment:5 Changed 8 years ago by nickm

Keywords: tor-relay added

comment:6 Changed 8 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.