[tor-bugs] #11825 [- Select a component]: Casts in tinytest macros suppress useful warnings

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 8 17:06:10 UTC 2014


#11825: Casts in tinytest macros suppress useful warnings
----------------------------------+------------------------------------
 Reporter:  nickm                 |          Owner:
     Type:  defect                |         Status:  new
 Priority:  normal                |      Milestone:  Tor: 0.2.5.x-final
Component:  - Select a component  |        Version:
 Keywords:  tor-client testing    |  Actual Points:
Parent ID:                        |         Points:
----------------------------------+------------------------------------
 In the tinytest tt_assert_test_fmt_type macro, we do:
 {{{
         type val1_ = (type) (a);
 \
         type val2_ = (type) (b);
 \
 }}}

 Those two typecasts are dangerous, since they suppress every
 signed/unsigned warning, narrowing warning, or whatever that would create
 a problem in our unit tests.  We should take them out and clean up the
 mess.

 Putting this in 0.2.5.x since working unit tests will help us find other
 bugs, maybe.

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


More information about the tor-bugs mailing list