46 warnings from Xcode on the wall, 46 warnings from Xcode... take several down, make a few variables signed and cast some other "%d"s to (int), 6 warnings from Xcode on the wall!

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9493 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2010-01-25 02:48:32 +00:00 committed by Git SVN Gateway
parent 56295f9360
commit dbd9be9a5a
7 changed files with 16 additions and 16 deletions

View File

@ -531,7 +531,7 @@ BOOL Init_FBO(unsigned int width, unsigned int height)
debug(LOG_ERROR, "Error: FBO Non-framebuffer passed to glCheckFramebufferStatusEXT()!");
break;
default:
debug(LOG_ERROR, "*UNKNOWN FBO ERROR* reported from glCheckFramebufferStatusEXT() for %x!", status);
debug(LOG_ERROR, "*UNKNOWN FBO ERROR* reported from glCheckFramebufferStatusEXT() for %x!", (unsigned int)status);
break;
}
FBOinit = false; //we have a error with the FBO setup

View File

@ -101,7 +101,7 @@ static inline void iV_printFontList(void)
* same buffer (according to GLC specs).
*/
char prBuffer[1024];
snprintf(prBuffer, sizeof(prBuffer), "Font #%d : %s ", font, (const char*)glcGetFontc(font, GLC_FAMILY));
snprintf(prBuffer, sizeof(prBuffer), "Font #%d : %s ", (int)font, (const char*)glcGetFontc(font, GLC_FAMILY));
prBuffer[sizeof(prBuffer) - 1] = 0;
sstrcat(prBuffer, glcGetFontFace(font));
debug(LOG_NEVER, "%s", prBuffer);
@ -122,7 +122,7 @@ static void iV_initializeGLC(void)
}
else
{
debug(LOG_NEVER, "Successfully initialized. _glcContext = %d", _glcContext);
debug(LOG_NEVER, "Successfully initialized. _glcContext = %d", (int)_glcContext);
}
glcContext(_glcContext);

View File

@ -107,7 +107,7 @@ typedef struct _zonemap_save_header {
#define ROOT_TABLE_SIZE 1024
/* The size and contents of the map */
UDWORD mapWidth = 0, mapHeight = 0;
SDWORD mapWidth = 0, mapHeight = 0;
MAPTILE *psMapTiles = NULL;
#define WATER_DEPTH 180

View File

@ -235,7 +235,7 @@ static inline unsigned char terrainType(const MAPTILE * tile)
#define TILE_MIN_HEIGHT 0
/* The size and contents of the map */
extern UDWORD mapWidth, mapHeight;
extern SDWORD mapWidth, mapHeight;
extern MAPTILE *psMapTiles;
extern float waterLevel;
@ -323,7 +323,7 @@ static inline WZ_DECL_PURE MAPTILE *mapTile(SDWORD x, SDWORD y)
}
/* Return height of tile at x,y */
static inline WZ_DECL_PURE float map_TileHeight(UDWORD x, UDWORD y)
static inline WZ_DECL_PURE float map_TileHeight(SDWORD x, SDWORD y)
{
if ( x >= mapWidth || y >= mapHeight )
{
@ -333,7 +333,7 @@ static inline WZ_DECL_PURE float map_TileHeight(UDWORD x, UDWORD y)
}
/* Return height of tile at x,y, uses float height_new */
static inline WZ_DECL_PURE float map_TileHeight_new(UDWORD x, UDWORD y)
static inline WZ_DECL_PURE float map_TileHeight_new(SDWORD x, SDWORD y)
{
if ( x >= mapWidth || y >= mapHeight )
{
@ -343,7 +343,7 @@ static inline WZ_DECL_PURE float map_TileHeight_new(UDWORD x, UDWORD y)
}
/* Return height of tile at x,y */
static inline WZ_DECL_PURE float map_WaterHeight(UDWORD x, UDWORD y)
static inline WZ_DECL_PURE float map_WaterHeight(SDWORD x, SDWORD y)
{
if ( x >= mapWidth || y >= mapHeight )
{
@ -354,7 +354,7 @@ static inline WZ_DECL_PURE float map_WaterHeight(UDWORD x, UDWORD y)
/*sets the tile height */
static inline void setTileHeight(UDWORD x, UDWORD y, float height)
static inline void setTileHeight(SDWORD x, SDWORD y, float height)
{
ASSERT_OR_RETURN( , x < mapWidth, "x coordinate %u bigger than map width %u", x, mapWidth);
ASSERT_OR_RETURN( , y < mapHeight, "y coordinate %u bigger than map height %u", y, mapHeight);

View File

@ -184,7 +184,7 @@ PointTree::ResultVector &PointTree::query(int32_t x, int32_t y, uint32_t radius)
}
lastQueryResults.clear();
for (unsigned r = 0; r != numRanges; ++r)
for (int r = 0; r != numRanges; ++r)
{
Vector::iterator i1 = std::lower_bound(points.begin(), points.end(), Point(ranges[r].a, NULL));
Vector::iterator i2 = std::lower_bound(i1, points.end(), Point(ranges[r].z + 1, NULL));

View File

@ -704,8 +704,8 @@ bool initTerrain(void)
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &GLmaxElementsIndices);
// testing for crappy cards
debug(LOG_TERRAIN, "GL_MAX_ELEMENTS_VERTICES: %i", GLmaxElementsVertices);
debug(LOG_TERRAIN, "GL_MAX_ELEMENTS_INDICES: %i", GLmaxElementsIndices);
debug(LOG_TERRAIN, "GL_MAX_ELEMENTS_VERTICES: %i", (int)GLmaxElementsVertices);
debug(LOG_TERRAIN, "GL_MAX_ELEMENTS_INDICES: %i", (int)GLmaxElementsIndices);
// now we know these values, determine the maximum sector size achievable
maxSectorSizeVertices = sqrt(GLmaxElementsVertices/2)-1;
@ -729,8 +729,8 @@ bool initTerrain(void)
{
if (sectorSize < 1)
{
debug(LOG_WARNING, "GL_MAX_ELEMENTS_VERTICES: %i", GLmaxElementsVertices);
debug(LOG_WARNING, "GL_MAX_ELEMENTS_INDICES: %i", GLmaxElementsIndices);
debug(LOG_WARNING, "GL_MAX_ELEMENTS_VERTICES: %i", (int)GLmaxElementsVertices);
debug(LOG_WARNING, "GL_MAX_ELEMENTS_INDICES: %i", (int)GLmaxElementsIndices);
debug(LOG_WARNING, "maximum sector size due to vertices: %i", maxSectorSizeVertices);
debug(LOG_WARNING, "maximum sector size due to indices: %i", maxSectorSizeIndices);
debug(LOG_ERROR, "Your graphics card and/or drivers do not seem to support glDrawRangeElements, needed for the terrain renderer.");

View File

@ -256,12 +256,12 @@ bool texLoad(const char *fileName)
xOffset = 0;
yOffset = 0;
debug(LOG_TEXTURE, "texLoad: Extra page added at %d for %s, was page %d, opengl id %u",
k, partialPath, texPage, _TEX_PAGE[texPage].id);
k, partialPath, texPage, (unsigned int)_TEX_PAGE[texPage].id);
texPage = newPage(fileName, j, xSize, ySize, k);
}
}
debug(LOG_TEXTURE, "texLoad: Found %d textures for %s mipmap level %d, added to page %d, opengl id %u",
k, partialPath, i, texPage, _TEX_PAGE[texPage].id);
k, partialPath, i, texPage, (unsigned int)_TEX_PAGE[texPage].id);
i /= 2; // halve the dimensions for the next series; OpenGL mipmaps start with largest at level zero
}