[tor-bugs] #18902 [Core Tor/Tor]: Avoid variable shadowing in Tor

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 5 00:57:46 UTC 2016


#18902: Avoid variable shadowing in Tor
---------------------------+------------------------------
 Reporter:  teor           |          Owner:  cypherpunks
     Type:  defect         |         Status:  assigned
 Priority:  Medium         |      Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor   |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:  easy refactor  |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+------------------------------

Comment (by teor):

 Replying to [comment:3 nickm]:
 > Suggestion 1: Think about reviewability as you go. I can easily see this
 patch becoming huge.

 I would hope to be able to verify the modifications by running the same
 automated script (see below).

 > Suggestion 2: Think about automation wherever possible. This test is
 mostly automatable.

 It may help to do this patch in several stages:
 * automatically rename every shadowed variable
 * manually cleanup long lines to appease `make check-spaces`
 * turn on `-Wshadow` in the tor makefile

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18902#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list