From 95210bc8064113e9810c8ea46e2afbb7d5f80fcb Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Apr 2003 14:50:12 +0000 Subject: fix minor warnings --- progs/demos/texenv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'progs/demos/texenv.c') diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c index 705cd2621f9..d64ae2ee264 100644 --- a/progs/demos/texenv.c +++ b/progs/demos/texenv.c @@ -169,7 +169,7 @@ struct baseFormatInfo baseFormats[] = }; #define NUM_ENV_COLORS (sizeof(envColors) / sizeof(envColors[0])) -int envColor; +int envColor = 0; GLfloat envColors[][4] = { { 0.0, 0.0, 0.0, 1.0 }, @@ -201,8 +201,6 @@ static void checkErrors( void ) { GLenum error; - return; - while ( (error = glGetError()) != GL_NO_ERROR ) { fprintf( stderr, "Error: %s\n", (char *) gluErrorString( error ) ); } @@ -271,7 +269,8 @@ static void keyboard( unsigned char c, int x, int y ) { switch ( c ) { case 'c': - envColor = (++envColor) % (int) NUM_ENV_COLORS; + envColor++; + envColor = envColor % (int) NUM_ENV_COLORS; break; case 'g': drawBackground = !drawBackground; -- cgit v1.2.3