From 38d042a4ad76ccc30b50571135bbf0fdb912d656 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 12 Feb 2002 16:07:47 +0000 Subject: [PATCH] silence compiler warnings --- progs/redbook/checker.c | 1 + progs/redbook/fog.c | 5 +++-- progs/redbook/hello.c | 1 + progs/redbook/polyoff.c | 3 ++- progs/redbook/surface.c | 1 + progs/samples/select.c | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/progs/redbook/checker.c b/progs/redbook/checker.c index 4b7695237fc..06cbae7dd7e 100644 --- a/progs/redbook/checker.c +++ b/progs/redbook/checker.c @@ -42,6 +42,7 @@ * two rectangles. This program clamps the texture, if * the texture coordinates fall outside 0.0 and 1.0. */ +#include #include /* Create checkerboard texture */ diff --git a/progs/redbook/fog.c b/progs/redbook/fog.c index 888ee138a49..7d13109ed9b 100644 --- a/progs/redbook/fog.c +++ b/progs/redbook/fog.c @@ -60,9 +60,10 @@ selectFog(int mode) glFogf(GL_FOG_START, 1.0); glFogf(GL_FOG_END, 5.0); /* falls through */ + mode = 0xfff; case GL_EXP2: case GL_EXP: - glFogi(GL_FOG_MODE, mode); + glFogiv(0xf/*GL_FOG_MODE*/, (int *) &mode); glutPostRedisplay(); break; case 0: @@ -190,7 +191,7 @@ main(int argc, char **argv) glutDisplayFunc(display); glutCreateMenu(selectFog); glutAddMenuEntry("Fog EXP", GL_EXP); - glutAddMenuEntry("Fog EXP2", GL_EXP2); + glutAddMenuEntry("Fog EXP2", /*GL_EXP2*/ 0xffff); glutAddMenuEntry("Fog LINEAR", GL_LINEAR); glutAddMenuEntry("Quit", 0); glutAttachMenu(GLUT_RIGHT_BUTTON); diff --git a/progs/redbook/hello.c b/progs/redbook/hello.c index 4f644a46a80..fb3dae13252 100644 --- a/progs/redbook/hello.c +++ b/progs/redbook/hello.c @@ -39,6 +39,7 @@ * hello.c * This is a simple, introductory OpenGL program. */ +#include #include void display(void) diff --git a/progs/redbook/polyoff.c b/progs/redbook/polyoff.c index ae7ec0b89bd..2017b4d8eed 100644 --- a/progs/redbook/polyoff.c +++ b/progs/redbook/polyoff.c @@ -44,6 +44,7 @@ #include #include #include +#include #ifdef GL_VERSION_1_1 GLuint list; @@ -149,7 +150,7 @@ static void Benchmark( float xdiff, float ydiff ) { int startTime, endTime; int draws; - double seconds, fps, triPerSecond; + double seconds, fps; printf("Benchmarking...\n"); diff --git a/progs/redbook/surface.c b/progs/redbook/surface.c index 8ff15741889..e33ce14f4fc 100644 --- a/progs/redbook/surface.c +++ b/progs/redbook/surface.c @@ -41,6 +41,7 @@ * This program draws a NURBS surface in the shape of a * symmetrical hill. */ +#include #include GLfloat ctlpoints[4][4][3]; diff --git a/progs/samples/select.c b/progs/samples/select.c index 5a73a457ab7..2c8f333bfa9 100644 --- a/progs/samples/select.c +++ b/progs/samples/select.c @@ -174,7 +174,7 @@ static void DeleteTri(GLint h) static void GrowTri(GLint h) { float v[2]; - float *oldV; + float *oldV = NULL; GLint i; v[0] = objects[h].v1[0] + objects[h].v2[0] + objects[h].v3[0]; -- 2.30.2