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

[tor-bugs] #16434 [Torsocks]: fix miscellaneous compiler warnings



#16434: fix miscellaneous compiler warnings
-------------------------+-------------------------
 Reporter:  cypherpunks  |          Owner:  dgoulet
     Type:  defect       |         Status:  new
 Priority:  normal       |      Milestone:
Component:  Torsocks     |        Version:
 Keywords:               |  Actual Points:
Parent ID:               |         Points:
-------------------------+-------------------------
 The attached patch tweaks things to avoid miscellaneous compiler warnings,
 from GCC and from the Clang static analyzer:

 - Avoid signed/unsigned comparison with judicious casts, justified by
 asserts.
 - Use the same type for indices into an array as are used for the size of
 the array.
 - Make sure variables are initialized even for error branches.
 - Avoid possible null pointer dereference in case of test failure.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16434>
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