[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 03:21:58 CST 2003
Hello.
Here's a small patch for socket/image.c to clean some compilation warnings under
W32.
Changed a few variables from int to char/short, and explicitely casted a (short
+ 1) to short (as that gets promoted to int & sent to a function expecting a short)
I think those changes are harmless, since incrimed variables were used as short
in the first place. Changing'em just makes that official :)
Nicolas 'Ryo'
-------------- next part --------------
Index: socket/image.c
===================================================================
RCS file: /cvsroot/crossfire/crossfire/socket/image.c,v
retrieving revision 1.4
diff -u -r1.4 image.c
--- socket/image.c 2 Dec 2003 18:51:44 -0000 1.4
+++ socket/image.c 6 Dec 2003 09:19:53 -0000
@@ -325,7 +325,7 @@
void esrv_send_face(NewSocket *ns,short face_num, int nocache)
{
SockList sl;
- int fallback;
+ char fallback;
if (face_num < 0 || face_num >= nrofpixmaps) {
LOG(llevError,"esrv_send_face (%d) out of bounds??\n",face_num);
@@ -414,7 +414,9 @@
*/
void send_image_sums(NewSocket *ns, char *params)
{
- int start, stop, qq,i;
+ int start, stop;
+ short i;
+ char qq;
char *cp, buf[MAX_BUF];
SockList sl;
@@ -443,7 +445,7 @@
SockList_AddChar(&sl, qq);
qq = strlen(new_faces[i].name);
- SockList_AddChar(&sl, qq + 1);
+ SockList_AddChar(&sl, ( char )( qq + 1 ));
strcpy(sl.buf + sl.len, new_faces[i].name);
sl.len += qq;
SockList_AddChar(&sl, 0);
-------------- 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