diff options
author | Brian Paul <[email protected]> | 2004-03-26 23:54:53 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-03-26 23:54:53 +0000 |
commit | 79b372b92a42aeee11f0500fefe8fc92126e39e3 (patch) | |
tree | 3a246d86c2da1d9752aa7d4be3e850a343ba5273 /src | |
parent | 7b776de12c3e2035f49ccd09d42a655dde90d26d (diff) |
fix some warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/api_arrayelt.c | 4 | ||||
-rw-r--r-- | src/mesa/main/arbparse.c | 10 | ||||
-rw-r--r-- | src/mesa/main/dlist.c | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index f42854a4db6..b375828d03a 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -791,7 +791,7 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) /* generic attributes */ for (at = actx->attribs; at->func; at++) { const GLubyte *src = at->array->BufferObj->Data - + (GLuint) at->array->Ptr + + (unsigned long) at->array->Ptr + elt * at->array->StrideB; at->func( at->index, src ); } @@ -799,7 +799,7 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) /* conventional arrays */ for (aa = actx->arrays; aa->func ; aa++) { const GLubyte *src = aa->array->BufferObj->Data - + (GLuint) aa->array->Ptr + + (unsigned long) aa->array->Ptr + elt * aa->array->StrideB; aa->func( src ); } diff --git a/src/mesa/main/arbparse.c b/src/mesa/main/arbparse.c index 01771597e93..b7b7d36dcc3 100644 --- a/src/mesa/main/arbparse.c +++ b/src/mesa/main/arbparse.c @@ -3062,7 +3062,7 @@ parse_generic_attrib_num(GLcontext *ctx, GLubyte ** inst, { *attrib = parse_integer(inst, Program); - if ((*attrib < 0) || (*attrib > MAX_VERTEX_PROGRAM_ATTRIBS)) + if (*attrib > MAX_VERTEX_PROGRAM_ATTRIBS) { _mesa_set_program_error (ctx, Program->Position, "Invalid generic vertex attribute index"); @@ -3085,7 +3085,7 @@ parse_texcoord_num (GLcontext * ctx, GLubyte ** inst, { *coord = parse_integer (inst, Program); - if ((*coord < 0) || (*coord >= ctx->Const.MaxTextureUnits)) { + if (*coord >= ctx->Const.MaxTextureUnits) { _mesa_set_program_error (ctx, Program->Position, "Invalid texture unit index"); _mesa_error (ctx, GL_INVALID_OPERATION, "Invalid texture unit index"); @@ -4092,7 +4092,8 @@ static GLuint parse_param (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head, struct arb_program *Program) { - GLuint found, specified_length, err; + GLuint found, err; + GLint specified_length; char *error_msg; struct var_cache *param_var; @@ -4690,7 +4691,8 @@ parse_src_reg (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head, GLboolean *IsRelOffset ) { struct var_cache *src; - GLuint binding_state, binding_idx, is_generic, found, offset; + GLuint binding_state, binding_idx, is_generic, found; + GLint offset; /* And the binding for the src */ switch (*(*inst)++) { diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 26bf76a0077..ef9c74fb743 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -4891,7 +4891,7 @@ static void GLAPIENTRY save_Begin( GLenum mode ) Node *n; GLboolean error = GL_FALSE; - if (mode < GL_POINTS || mode > GL_POLYGON) { + if (/*mode < GL_POINTS ||*/ mode > GL_POLYGON) { _mesa_compile_error( ctx, GL_INVALID_ENUM, "Begin (mode)"); error = GL_TRUE; } |