MSVC: kill level 3 warnings

This commit is contained in:
Alam Ed Arias 2016-05-22 00:44:12 -04:00
parent 57091261d9
commit f45feb77fc
6 changed files with 12 additions and 11 deletions

View File

@ -9,13 +9,14 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level2</WarningLevel>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<SDLCheck>false</SDLCheck>
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>

View File

@ -1214,7 +1214,7 @@ static void P_LoadLineDefs2(void)
case 443: // Calls a named Lua function
if (sides[ld->sidenum[0]].text)
{
UINT8 len = strlen(sides[ld->sidenum[0]].text)+1;
size_t len = strlen(sides[ld->sidenum[0]].text)+1;
if (ld->sidenum[1] != 0xffff && sides[ld->sidenum[1]].text)
len += strlen(sides[ld->sidenum[1]].text);
ld->text = Z_Malloc(len, PU_LEVEL, NULL);

View File

@ -407,7 +407,7 @@ void P_ParseANIMDEFSLump(INT32 wadNum, UINT16 lumpnum, INT32 *i)
void P_ParseAnimationDefintion(SINT8 istexture, INT32 *i)
{
char *animdefsToken;
UINT8 animdefsTokenLength;
size_t animdefsTokenLength;
char *endPos;
INT32 animSpeed;

View File

@ -497,7 +497,7 @@ void R_LoadTextures(void)
static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)
{
char *texturesToken;
UINT8 texturesTokenLength;
size_t texturesTokenLength;
char *endPos;
char *patchName = NULL;
INT16 patchXPos;
@ -623,7 +623,7 @@ static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)
static texture_t *R_ParseTexture(boolean actuallyLoadTexture)
{
char *texturesToken;
UINT8 texturesTokenLength;
size_t texturesTokenLength;
char *endPos;
INT32 newTextureWidth;
INT32 newTextureHeight;

View File

@ -1679,7 +1679,7 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener)
UINT8 *p = mumble->context;
WRITEMEM(p, server_context, 8);
WRITEINT16(p, gamemap);
mumble->context_len = p - mumble->context;
mumble->context_len = (UINT32)(p - mumble->context);
}
if (mobj) {

View File

@ -239,7 +239,7 @@ static Mix_Chunk *ds2chunk(void *stream)
}
// return Mixer Chunk.
return Mix_QuickLoad_RAW(sound, (UINT8*)d-sound);
return Mix_QuickLoad_RAW(sound, (Uint32)((UINT8*)d-sound));
}
void *I_GetSfx(sfxinfo_t *sfx)
@ -647,9 +647,9 @@ boolean I_StartDigSong(const char *musicname, boolean looping)
const char *key1 = "LOOP";
const char *key2 = "POINT=";
const char *key3 = "MS=";
const UINT8 key1len = strlen(key1);
const UINT8 key2len = strlen(key2);
const UINT8 key3len = strlen(key3);
const size_t key1len = strlen(key1);
const size_t key2len = strlen(key2);
const size_t key3len = strlen(key3);
char *p = data;
while ((UINT32)(p - data) < len)
{
@ -668,7 +668,7 @@ boolean I_StartDigSong(const char *musicname, boolean looping)
else if (!strncmp(p, key3, key3len)) // is it LOOPMS=?
{
p += key3len; // skip MS=
loop_point = atoi(p) / 1000.0L; // LOOPMS works by real time, as miliseconds.
loop_point = (float)(atoi(p) / 1000.0L); // LOOPMS works by real time, as miliseconds.
// Everything that uses LOOPMS will work perfectly with SDL_Mixer.
}
// Neither?! Continue searching.