From db6aa58267cad3f502f03ab80b9deb6b75320a91 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Nov 2000 17:23:02 +0000 Subject: patched to silence compiler warnings (Martin Lindhe) --- progs/redbook/picksquare.c | 2 +- progs/redbook/wrap.c | 2 +- progs/samples/wave.c | 4 ++-- progs/xdemos/glxheads.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'progs') diff --git a/progs/redbook/picksquare.c b/progs/redbook/picksquare.c index 0a12aa0fac..b68117c278 100644 --- a/progs/redbook/picksquare.c +++ b/progs/redbook/picksquare.c @@ -88,7 +88,7 @@ void drawSquares(GLenum mode) void processHits (GLint hits, GLuint buffer[]) { unsigned int i, j; - GLuint ii, jj, names, *ptr; + GLuint ii = 0, jj = 0, names, *ptr; printf ("hits = %d\n", hits); ptr = (GLuint *) buffer; diff --git a/progs/redbook/wrap.c b/progs/redbook/wrap.c index c67e04a7f3..f9a1f162ab 100644 --- a/progs/redbook/wrap.c +++ b/progs/redbook/wrap.c @@ -65,7 +65,7 @@ void makeCheckImage(void) for (i = 0; i < checkImageHeight; i++) { for (j = 0; j < checkImageWidth; j++) { - c = ((((i&0x8)==0)^((j&0x8))==0))*255; + c = (((i&0x8)==0)^((j&0x8)==0))*255; checkImage[i][j][0] = (GLubyte) c; checkImage[i][j][1] = (GLubyte) c; checkImage[i][j][2] = (GLubyte) c; diff --git a/progs/samples/wave.c b/progs/samples/wave.c index 288bea4eb7..7ded49bedc 100644 --- a/progs/samples/wave.c +++ b/progs/samples/wave.c @@ -186,8 +186,8 @@ static void SetColorMap(void) { static float green[3] = {0.2, 1.0, 0.2}; static float red[3] = {1.0, 0.2, 0.2}; - float *color, percent; - GLint *indexes, entries, i, j; + float *color = 0, percent; + GLint *indexes = 0, entries, i, j; entries = glutGet(GLUT_WINDOW_COLORMAP_SIZE); diff --git a/progs/xdemos/glxheads.c b/progs/xdemos/glxheads.c index a20c72354f..42bfc835ad 100644 --- a/progs/xdemos/glxheads.c +++ b/progs/xdemos/glxheads.c @@ -1,4 +1,4 @@ -/* $Id: glxheads.c,v 1.1 2000/06/13 19:41:30 brianp Exp $ */ +/* $Id: glxheads.c,v 1.2 2000/11/10 17:23:07 brianp Exp $ */ /* * Exercise multiple GLX connections on multiple X displays. @@ -139,7 +139,7 @@ AddHead(const char *displayName) if (!glXMakeCurrent(dpy, win, ctx)) { Error(displayName, "glXMakeCurrent failed"); printf("glXMakeCurrent failed in Redraw()\n"); - return; + return NULL; } /* save the info for this head */ -- cgit v1.2.3