150 warnings from Warzone in Xcode, 150 warnings in Xcode... Take several down, cast a whole bunch of things passed as "%i" to (int), 46 warnings from Warzone in Xcode!

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9488 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2010-01-24 22:44:22 +00:00 committed by Git SVN Gateway
parent ccef0c4b47
commit 56295f9360
1 changed files with 5 additions and 5 deletions

View File

@ -121,7 +121,7 @@ static bool terrainInitalised = false;
#define glError() { \
GLenum err = glGetError(); \
while (err != GL_NO_ERROR) { \
debug(LOG_ERROR, "OpenGL error %i caught at %s:%u\n", err, __FILE__, __LINE__); \
debug(LOG_ERROR, "OpenGL error %i caught at %s:%u\n", (int)err, __FILE__, __LINE__); \
err = glGetError(); \
} \
}
@ -143,8 +143,8 @@ static void finishDrawRangeElements(void)
{
if (drawRangeElementsStarted && dreCount > 0)
{
ASSERT(dreEnd - dreStart + 1 <= GLmaxElementsVertices, "too many vertices (%i)", dreEnd - dreStart + 1);
ASSERT(dreCount <= GLmaxElementsIndices, "too many indices (%i)", dreCount);
ASSERT(dreEnd - dreStart + 1 <= GLmaxElementsVertices, "too many vertices (%i)", (int)(dreEnd - dreStart + 1));
ASSERT(dreCount <= GLmaxElementsIndices, "too many indices (%i)", (int)dreCount);
glDrawRangeElements(GL_TRIANGLES,
dreStart,
dreEnd,
@ -205,8 +205,8 @@ static void addDrawRangeElements(GLenum mode,
dreEnd = end;
}
// make sure we did everything right
ASSERT(dreEnd - dreStart + 1 <= GLmaxElementsVertices, "too many vertices (%i)", dreEnd - dreStart + 1);
ASSERT(dreCount <= GLmaxElementsIndices, "too many indices (%i)", dreCount);
ASSERT(dreEnd - dreStart + 1 <= GLmaxElementsVertices, "too many vertices (%i)", (int)(dreEnd - dreStart + 1));
ASSERT(dreCount <= GLmaxElementsIndices, "too many indices (%i)", (int)(dreCount));
}
/// Get the colour of the terrain tile at the specified position