Fix some compiler warnings

GCC complains that some variable might be used uninitialized.
This commit is contained in:
Emmanuele Bassi 2010-02-09 16:57:14 +00:00
parent d3948fab8c
commit 0145562cad

View File

@ -408,19 +408,23 @@ _cogl_matrix_stack_flush_to_gl (CoglMatrixStack *stack,
if (ctx->flushed_matrix_mode != mode) if (ctx->flushed_matrix_mode != mode)
{ {
GLenum gl_mode; GLenum gl_mode = 0;
switch (mode) switch (mode)
{ {
case COGL_MATRIX_MODELVIEW: case COGL_MATRIX_MODELVIEW:
gl_mode = GL_MODELVIEW; gl_mode = GL_MODELVIEW;
break; break;
case COGL_MATRIX_PROJECTION: case COGL_MATRIX_PROJECTION:
gl_mode = GL_PROJECTION; gl_mode = GL_PROJECTION;
break; break;
case COGL_MATRIX_TEXTURE: case COGL_MATRIX_TEXTURE:
gl_mode = GL_TEXTURE; gl_mode = GL_TEXTURE;
break; break;
} }
GE (glMatrixMode (gl_mode)); GE (glMatrixMode (gl_mode));
ctx->flushed_matrix_mode = mode; ctx->flushed_matrix_mode = mode;
} }