added some casts

This commit is contained in:
Brian Paul
2002-04-19 00:23:08 +00:00
parent 36c3df78f4
commit db07de057f
5 changed files with 14 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: api_arrayelt.c,v 1.7 2002/04/09 16:56:50 keithw Exp $ */
/* $Id: api_arrayelt.c,v 1.8 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -275,7 +275,7 @@ static void _ae_update_state( GLcontext *ctx )
AEcontext *actx = AE_CONTEXT(ctx);
AEtexarray *ta = actx->texarrays;
AEarray *aa = actx->arrays;
int i;
GLuint i;
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
if (ctx->Array.TexCoord[i].Enabled) {

View File

@@ -1,4 +1,4 @@
/* $Id: buffers.c,v 1.33 2002/03/16 00:53:15 brianp Exp $ */
/* $Id: buffers.c,v 1.34 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -373,8 +373,7 @@ _mesa_ResizeBuffersMESA( void )
(*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height );
/* see if size of device driver's color buffer (window) has changed */
if (buffer->Width == (GLint) buf_width &&
buffer->Height == (GLint) buf_height)
if (buffer->Width == buf_width && buffer->Height == buf_height)
return; /* size is as expected */
buffer->Width = buf_width;
@@ -391,8 +390,7 @@ _mesa_ResizeBuffersMESA( void )
(*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height );
/* see if size of device driver's color buffer (window) has changed */
if (buffer->Width == (GLint) buf_width &&
buffer->Height == (GLint) buf_height)
if (buffer->Width == buf_width && buffer->Height == buf_height)
return; /* size is as expected */
buffer->Width = buf_width;

View File

@@ -1,4 +1,4 @@
/* $Id: context.c,v 1.160 2002/04/09 16:56:50 keithw Exp $ */
/* $Id: context.c,v 1.161 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -477,7 +477,7 @@ init_matrix_stack( struct matrix_stack *stack,
stack->MaxDepth = maxDepth;
stack->DirtyFlag = dirtyFlag;
/* The stack */
stack->Stack = CALLOC(maxDepth * sizeof(GLmatrix));
stack->Stack = (GLmatrix *) CALLOC(maxDepth * sizeof(GLmatrix));
for (i = 0; i < maxDepth; i++) {
_math_matrix_ctr(&stack->Stack[i]);
_math_matrix_alloc_inv(&stack->Stack[i]);

View File

@@ -1,4 +1,4 @@
/* $Id: enable.c,v 1.59 2002/03/29 17:27:59 brianp Exp $ */
/* $Id: enable.c,v 1.60 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -209,7 +209,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
{
const GLuint p = cap - GL_CLIP_PLANE0;
if ((ctx->Transform.ClipPlanesEnabled & (1 << p)) == (state << p))
if ((ctx->Transform.ClipPlanesEnabled & (1 << p)) == ((GLuint) state << p))
return;
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);

View File

@@ -1,4 +1,4 @@
/* $Id: texstate.c,v 1.67 2002/04/12 21:17:28 brianp Exp $ */
/* $Id: texstate.c,v 1.68 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1110,7 +1110,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
const GLenum mode = (GLenum) params[0];
if (mode == GL_NONE || mode == GL_COMPARE_R_TO_TEXTURE_ARB) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texObj->CompareMode = params[0];
texObj->CompareMode = mode;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -1129,7 +1129,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
const GLenum func = (GLenum) params[0];
if (func == GL_LEQUAL || func == GL_GEQUAL) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texObj->CompareFunc = params[0];
texObj->CompareFunc = func;
}
else if (ctx->Extensions.EXT_shadow_funcs &&
(func == GL_EQUAL ||
@@ -1139,7 +1139,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
func == GL_ALWAYS ||
func == GL_NEVER)) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texObj->CompareFunc = params[0];
texObj->CompareFunc = func;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -1159,7 +1159,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
if (result == GL_LUMINANCE || result == GL_INTENSITY
|| result == GL_ALPHA) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texObj->DepthMode = params[0];
texObj->DepthMode = result;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,