From 56295f9360c655d8d070456a4590a61a50f33aa7 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sun, 24 Jan 2010 22:44:22 +0000 Subject: [PATCH] 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 --- src/terrain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/terrain.c b/src/terrain.c index 4a82b0c8e..0deefd747 100644 --- a/src/terrain.c +++ b/src/terrain.c @@ -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