[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs