warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4098 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+2
-2
@@ -149,7 +149,7 @@ const char *maketimestr()
|
||||
time(&rawtime);
|
||||
timeinfo = localtime(&rawtime);
|
||||
if(!timeinfo) return NULL;
|
||||
int len = strftime(buf, sizeof(buf), "%Y%b%d_%H%M%S", timeinfo);
|
||||
int len = (int)strftime(buf, sizeof(buf), "%Y%b%d_%H%M%S", timeinfo);
|
||||
if(!len || len>=(int)sizeof(buf)) return NULL;
|
||||
return buf;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ void jpeg_screenshot(char *imagepath)
|
||||
jpeg_set_quality(&cinfo, jpegquality, TRUE);
|
||||
jpeg_start_compress(&cinfo, TRUE);
|
||||
const char *comment = asciiscores(true);
|
||||
jpeg_write_marker(&cinfo, JPEG_COM, (JOCTET *) comment, strlen(comment));
|
||||
jpeg_write_marker(&cinfo, JPEG_COM, (JOCTET *) comment, (uint)strlen(comment));
|
||||
|
||||
while(cinfo.next_scanline < cinfo.image_height)
|
||||
{
|
||||
|
||||
@@ -3489,7 +3489,7 @@ void extinfo_statsbuf(ucharbuf &p, int pid, int bpos, ENetSocket &pongsock, ENet
|
||||
|
||||
buf.dataLength = len + p.length();
|
||||
enet_socket_send(pongsock, &addr, &buf, 1);
|
||||
*csend += buf.dataLength;
|
||||
*csend += (int)buf.dataLength;
|
||||
|
||||
if(pid>-1) break;
|
||||
p.len=bpos;
|
||||
|
||||
@@ -252,7 +252,7 @@ void serverms(int mode, int numplayers, int minremain, char *smapname, int milli
|
||||
int bpos = po.length(); // remember buffer position
|
||||
putint(po, EXT_PLAYERSTATS_RESP_IDS); // send player ids following
|
||||
extinfo_cnbuf(po, cn);
|
||||
*csend += buf.dataLength = len + po.length();
|
||||
*csend += int(buf.dataLength = len + po.length());
|
||||
enet_socket_send(pongsock, &addr, &buf, 1); // send all available player ids
|
||||
po.len = bpos;
|
||||
|
||||
@@ -272,8 +272,8 @@ void serverms(int mode, int numplayers, int minremain, char *smapname, int milli
|
||||
|
||||
buf.dataLength = len + po.length();
|
||||
enet_socket_send(pongsock, &addr, &buf, 1);
|
||||
if(std) *msend += buf.dataLength;
|
||||
else *csend += buf.dataLength;
|
||||
if(std) *msend += (int)buf.dataLength;
|
||||
else *csend += (int)buf.dataLength;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user