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

Re: [tor-bugs] #3692 [Tor Client]: Fix compiler warnings in master



#3692: Fix compiler warnings in master
------------------------+---------------------------------------------------
 Reporter:  karsten     |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  minor       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by nickm):

 Unfortunately, It's not the right fix.   You actually need to get the
 types to match between format strings and printf args.

 %ld takes a long int; %d takes an int; size_t is neither.

 Now, if we could assume full c99 support, we could say "%zu" here, but
 instead, if this is just for log messages, I think we're better off
 leaving the format as %ld, and casting the arguments to long.

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