From f418d18ea6059c761f45f055c05fbd0bb50f7a80 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 13 Aug 2009 13:44:31 -0600 Subject: mesa: fix some potential uninitialized memory references --- src/mesa/main/light.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main/light.c') diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index ac604fd12c..17034680ad 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -496,7 +496,7 @@ _mesa_LightModeliv( GLenum pname, const GLint *params ) break; default: /* Error will be caught later in gl_LightModelfv */ - ; + ASSIGN_4V(fparam, 0.0F, 0.0F, 0.0F, 0.0F); } _mesa_LightModelfv( pname, fparam ); } -- cgit v1.2.3 From ecb177eaea20f3464b08dfc4d94a3194482cf73d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 13 Aug 2009 14:05:52 -0600 Subject: mesa: fix warnings about locals hiding function params --- src/mesa/main/dlist.c | 6 +++--- src/mesa/main/light.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mesa/main/light.c') diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 2e36eee3de..f8fdd7045a 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1016,7 +1016,7 @@ _mesa_save_CallList(GLuint list) void GLAPIENTRY -_mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists) +_mesa_save_CallLists(GLsizei num, GLenum type, const GLvoid * lists) { GET_CURRENT_CONTEXT(ctx); GLint i; @@ -1041,7 +1041,7 @@ _mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists) typeErrorFlag = GL_TRUE; } - for (i = 0; i < n; i++) { + for (i = 0; i < num; i++) { GLint list = translate_id(i, type, lists); Node *n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST_OFFSET, 2); if (n) { @@ -1056,7 +1056,7 @@ _mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists) invalidate_saved_current_state( ctx ); if (ctx->ExecuteFlag) { - CALL_CallLists(ctx->Exec, (n, type, lists)); + CALL_CallLists(ctx->Exec, (num, type, lists)); } } diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 17034680ad..7479fe8fc4 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1224,15 +1224,15 @@ _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state ) ctx->Driver.LightingSpaceChange( ctx ); } else { - GLuint new_state = ctx->NewState; + GLuint new_state2 = ctx->NewState; /* Recalculate that same state only if it has been invalidated * by other statechanges. */ - if (new_state & _NEW_MODELVIEW) + if (new_state2 & _NEW_MODELVIEW) update_modelview_scale(ctx); - if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW)) + if (new_state2 & (_NEW_LIGHT|_NEW_MODELVIEW)) compute_light_positions( ctx ); } } -- cgit v1.2.3