[tor-bugs] #14189 [Tor]: Silence implicit uint64_t to size_t conversion warnings in clang on 32-bit OS X
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Jan 13 06:09:47 UTC 2015
#14189: Silence implicit uint64_t to size_t conversion warnings in clang on 32-bit
OS X
--------------------+------------------------------------
Reporter: teor | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version: Tor: 0.2.6.2-alpha
Keywords: clang | Actual Points:
Parent ID: | Points:
--------------------+------------------------------------
The out of memory checking code performs a calculation based on the
difference between the memory used (a `size_t`) and the memory limit (a
`uint64_t`).
This causes warnings in clang about implicit conversions losing precision.
To ensure this isn't happening, I assert `MaxMemInQueues <= SIZE_T_MAX`
before casting.
Branch will be posted after I have the bug number.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14189>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list