[Pidgin] #5613: Problems detected using static analysis tool

Pidgin trac at pidgin.im
Thu Apr 24 05:24:40 EDT 2008


#5613: Problems detected using static analysis tool
---------------------------+------------------------------------------------
  Reporter:  julianday     |       Owner:  lschiere
      Type:  patch         |      Status:  new     
  Priority:  minor         |   Milestone:          
 Component:  unclassified  |     Version:  2.4.1   
Resolution:                |    Keywords:          
   Pending:  0             |  
---------------------------+------------------------------------------------
Comment (by julianday):

 Replying to [comment:2 QuLogic]:
 > So I haven't looked at everything, but I'm just wondering why in some
 places you replaced -1 with ~1, and in other places with ~0.

 Sorry, too quick with the send... They should be ~0, not ~1 in every case.
 The reason is that assiging -1 to an unsigned, such as size_t, results in
 a change of sign. Using ~0 has the same bit pattern, but is unsigned. I'll
 check all my changes and re-submit the patch.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/5613#comment:4>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list