[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #2696 [Tor Relay]: Tor doesn't compile under LLVM/clang with --enable-gcc-warnings
#2696: Tor doesn't compile under LLVM/clang with --enable-gcc-warnings
-----------------------+----------------------------------------------------
Reporter: sjmurdoch | Owner:
Type: defect | Status: needs_review
Priority: minor | Milestone: Tor: 0.2.2.x-final
Component: Tor Relay | Version:
Keywords: | Parent:
Points: | Actualpoints:
-----------------------+----------------------------------------------------
Comment(by Sebastian):
Replying to [comment:6 nickm]:
> The autoconf thing looks fine.
>
> The MAX_LAST_SEEN_IN_MINUTES thing seems to involve a signed/unsigned
comparison though. If "now" is negative, we'll hit the assertion. It
also seems to be assuming 32-bit int; the more proper way to get a maximum
here woudl be to define MAX_LAST_SEEN_IN_MINUTES in terms of UINT_MAX. Do
we care about these?
hrm. Does our other code work where int isn't 32bit? I thought we didn't,
but I could well be wrong. How could negative now happen? Should we have a
wrapper around time() that prevents negative values (and later implements
the configurable time offset if we choose to do that)?
>
> (And by 0x3F...u? Why not, say, 0x4F...u) or 0x5F...u?
Because that's the largest value you can store in last_seen_in_minutes
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2696#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs