summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-04-21 14:50:12 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-04-21 14:50:12 +0000
commit95210bc8064113e9810c8ea46e2afbb7d5f80fcb (patch)
tree82a27cd2f07dd6e68e7c24713c4a946a59f14504
parente5db876329126ff799999223fcd0813c3e5ed95c (diff)
fix minor warnings
-rw-r--r--progs/demos/gltestperf.c4
-rw-r--r--progs/demos/shadowtex.c4
-rw-r--r--progs/demos/stex3d.c4
-rw-r--r--progs/demos/texenv.c7
-rw-r--r--progs/demos/texobj.c3
5 files changed, 9 insertions, 13 deletions
diff --git a/progs/demos/gltestperf.c b/progs/demos/gltestperf.c
index 2df168ba54..be95390101 100644
--- a/progs/demos/gltestperf.c
+++ b/progs/demos/gltestperf.c
@@ -164,7 +164,7 @@ init_test04(void)
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 128, 128, GL_RGB,
GL_UNSIGNED_BYTE, (GLvoid *) (&tex[0])))) {
- fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
+ fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
exit(-1);
}
@@ -239,7 +239,7 @@ init_test05(void)
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 128, 128, GL_RGB,
GL_UNSIGNED_BYTE, (GLvoid *) (&tex[0])))) {
- fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
+ fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
exit(-1);
}
diff --git a/progs/demos/shadowtex.c b/progs/demos/shadowtex.c
index b574f43acd..18aad47ed5 100644
--- a/progs/demos/shadowtex.c
+++ b/progs/demos/shadowtex.c
@@ -1,5 +1,3 @@
-/* $Id: shadowtex.c,v 1.7 2002/07/12 15:54:02 brianp Exp $ */
-
/*
* Shadow demo using the GL_ARB_depth_texture, GL_ARB_shadow and
* GL_ARB_shadow_ambient extensions (or the old SGIX extensions).
@@ -362,7 +360,7 @@ Display(void)
error = glGetError();
if (error) {
- printf("GL Error: %s\n", gluErrorString(error));
+ printf("GL Error: %s\n", (char *) gluErrorString(error));
}
}
diff --git a/progs/demos/stex3d.c b/progs/demos/stex3d.c
index b7ba1e9b0f..e4554d071f 100644
--- a/progs/demos/stex3d.c
+++ b/progs/demos/stex3d.c
@@ -1,5 +1,3 @@
-/* $Id: stex3d.c,v 1.9 2003/03/31 16:51:38 brianp Exp $ */
-
/*-----------------------------
* stex3d.c GL example of the mesa 3d-texture extention to simulate procedural
* texturing, it uses a perlin noise and turbulence functions.
@@ -535,7 +533,7 @@ KeyHandler(unsigned char key, int x, int y)
}
-void
+static void
create3Dgradient(void)
{
unsigned char *v;
diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c
index 705cd2621f..d64ae2ee26 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;
diff --git a/progs/demos/texobj.c b/progs/demos/texobj.c
index d4173604b7..3ec9e85f85 100644
--- a/progs/demos/texobj.c
+++ b/progs/demos/texobj.c
@@ -1,4 +1,4 @@
-/* $Id: texobj.c,v 1.6 2002/01/04 21:05:57 brianp Exp $ */
+/* $Id: texobj.c,v 1.7 2003/04/21 14:50:12 brianp Exp $ */
/*
* Example of using the 1.1 texture object functions.
@@ -9,6 +9,7 @@
#include <assert.h>
#include <math.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GL/glut.h"