[CF-Devel] Patch: some warning cleaning under Win32

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Wed Dec 10 02:14:11 CST 2003


>
     
       please don't compress/gzip/whatever small attachments - it makes it 
     
     >
     
      harder to just quickly browse the change.
     
     
Hum I think the patch is around 10k, do you consider that small?
(no pun intended, just wondering)

>
     
       Changing any data type to 'char' is sure to cause problems.
     
     >
     
     
     >
     
       This is because I don't believe the data type of 'char' is defined as 
     
     >
     
      either signed or unsigned.  That is to say on some systems, this may be 
     
     >
     
      a signed value, while on other systems, it would be an unsigned value.
     
     >
     
     
     >
     
       Thus, in the case where you mention in sound play, that may break 
     
     >
     
      things on systems where chars are unsigned (passing in -1 will not 
     
     >
     
      result in the value you want).  So basic moral is never use 'char' for 
     
     >
     
      anything but strings.  Use the uint8/sint8 types instead.
     
     >
     
     
     >
     
       This applies to other code where you've changed some other type to a 
     
     >
     
      char. I'm considered about the stat code, as another example.  Many of 
     
     >
     
      the stat numbers are now above 127 - assigning those a value greater 
     
     >
     
      than 127 may not have the desired effects.
     
     
Ok, I will change to uint8 or sint8 (depending on the use).
Apart that mistake on s/uint8, any objection to the patch?

Nicolas 'Ryo'


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list