From d503852b84fbfce31f99f3ab89d7e07ab83b3a59 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Fri, 2 Jan 2009 17:43:40 +0000 Subject: [PATCH] warning fixes git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4098 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/main.cpp | 4 ++-- source/src/server.cpp | 2 +- source/src/serverms.cpp | 6 +++--- source/vcpp/cube.vcproj | 12 ++++++++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/source/src/main.cpp b/source/src/main.cpp index da82c966..08de48b3 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -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) { diff --git a/source/src/server.cpp b/source/src/server.cpp index 26c53796..ef960208 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -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; diff --git a/source/src/serverms.cpp b/source/src/serverms.cpp index 74742487..3525c810 100644 --- a/source/src/serverms.cpp +++ b/source/src/serverms.cpp @@ -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; } } diff --git a/source/vcpp/cube.vcproj b/source/vcpp/cube.vcproj index c81d2ab9..0976d8af 100644 --- a/source/vcpp/cube.vcproj +++ b/source/vcpp/cube.vcproj @@ -1,7 +1,7 @@ + + +