[tor-bugs] #32495 [Core Tor/Tor]: relay_config.h: avoid redundant typedef for or_options_t
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Nov 14 17:52:18 UTC 2019
#32495: relay_config.h: avoid redundant typedef for or_options_t
----------------------------+------------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status: needs_revision
Priority: High | Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: tor-ci-failure | Actual Points: 0
Parent ID: | Points:
Reviewer: catalyst | Sponsor: Sponsor31-can
----------------------------+------------------------------------
Changes (by catalyst):
* status: needs_review => needs_revision
Comment:
The Jenkins log at https://jenkins.torproject.org/job/tor-ci-freebsd-
amd64-master/388/consoleFull does show the other headers causing problems
with redefining `or_options_t`.
Also from the Jenkins log, I also see redefinitions of `smartlist_t` that
occur in relay_config.h, transport_config.h, but not dirauth_config.h.
For `or_options_t`, I see several possible options:
* Leave the `or_options_t` typedef in or.h, but require that inclusion of
or.h precede any other headers that require that typedef. That's not great
from a standpoint of modularizing our headers.
* Remove the `or_options_t` typedef from or.h, and define it in a shared
header file.
* Leave the `or_options_t` typedef in or.h, but remove all references to
the typedef in header files (using the struct tag instead).
Other possibilities might exist. What do you think?
For the `smartlist_t` redefinitions, maybe we can explicitly include
smartlist.h in those headers? Is there a reason not to?
Also, it's probably worth noting that when I tried write minimal test
cases to produce this warning, I was only able to do so on clang, and even
then only if using options such as `-std=c99`. So maybe FreeBSD adjusts
some of the warning behaviors. Note this means that Travis CI probably
won't detect future instances of this problem.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32495#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list