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

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Sat Dec 6 12:57:26 CST 2003


Here's another patch to remove some compilation warnings (for Win32 at least).
(note: this patch completes and replaces the previous one)

Core of changes is type fixing. When a socket function was used to write data, I 
either explicitly casted the argument(s) to the matching type (ie 
SockList_AddChar( &sl, ( char )x ) where x is an int) or fixed the argument's 
type by changing its definition (ie changing int x to char x).
Also fixed a few signed/unsigned mismatches.

I also changed the sounds functions prototypes, 'cause x, y (relative 
coordinates) are sent as char anyway so no need to give int, same for soundnum 
(int sent as short)

Finally, tweaked global.h, the Win32 specific part, and also changed freearr_x / 
freearr_y to be short[ ] instead of int[ ]. Consequently common/object.c is 
patched too for the actual implementation of those variables :)

Nicolas 'Ryo'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warning1.patch.gz
Type: application/x-gzip-compressed
Size: 3814 bytes
Desc: not available
Url : 
     
     http://shadowknight.real-time.com/pipermail/crossfire/attachments/20031206/7cca54fc/warning1.patch.bin
     
     
-------------- next part --------------
_______________________________________________
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