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:
Lee Salzman
2009-01-02 17:43:40 +00:00
parent ef014a3355
commit d503852b84
4 changed files with 16 additions and 8 deletions
+2 -2
View File
@@ -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)
{
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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;
}
}
+10 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="8.00"
Name="cube"
ProjectGUID="{1FAF5BB4-C49A-4124-9F23-188528BAE7C8}"
RootNamespace="cube"
@@ -163,7 +163,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
FloatingPointModel="2"
UsePrecompiledHeader="0"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough="pch.h"
PrecompiledHeaderFile=".\Debug/cube.pch"
AssemblerListingLocation=".\Debug/"
@@ -1861,6 +1861,14 @@
<File
RelativePath=".\SDL_win32_main.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\tools.cpp"