From 9e2eee4ab203773fa4b420d3782f0074f5b3bf32 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 01:02:16 -0800 Subject: progs/redbook: Silence compiler warnings in aaindex.c. --- progs/redbook/aaindex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'progs') diff --git a/progs/redbook/aaindex.c b/progs/redbook/aaindex.c index 7dbc7b4b9b..6011ec44b6 100644 --- a/progs/redbook/aaindex.c +++ b/progs/redbook/aaindex.c @@ -56,7 +56,7 @@ static float rotAngle = 0.; * at RAMP1START, and a blue color ramp starting * at RAMP2START. The ramps must be a multiple of 16. */ -void init(void) +static void init(void) { int i; @@ -76,7 +76,7 @@ void init(void) /* Draw 2 diagonal lines to form an X */ -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -101,7 +101,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -117,7 +117,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 'r': -- cgit v1.2.3 From 44d6ab6de5d5c02c38146086d3f03523968df49e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 01:11:56 -0800 Subject: progs/tests: Silence compiler warnings in cva.c. --- progs/tests/cva.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'progs') diff --git a/progs/tests/cva.c b/progs/tests/cva.c index 80483900cb..02d1dcba2e 100644 --- a/progs/tests/cva.c +++ b/progs/tests/cva.c @@ -39,7 +39,7 @@ GLboolean compiled = GL_TRUE; GLboolean doubleBuffer = GL_TRUE; -void init( void ) +static void init( void ) { glClearColor( 0.0, 0.0, 0.0, 0.0 ); glShadeModel( GL_SMOOTH ); @@ -69,7 +69,7 @@ void init( void ) #endif } -void display( void ) +static void display( void ) { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); @@ -81,7 +81,7 @@ void display( void ) } } -void keyboard( unsigned char key, int x, int y ) +static void keyboard( unsigned char key, int x, int y ) { switch ( key ) { case 27: @@ -92,7 +92,7 @@ void keyboard( unsigned char key, int x, int y ) glutPostRedisplay(); } -GLboolean args( int argc, char **argv ) +static GLboolean args( int argc, char **argv ) { GLint i; -- cgit v1.2.3 From d5be33477e4a5cb73a5ccc24c2ad6518adddeb40 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 01:34:33 -0800 Subject: progs/tests: Silence compiler warnings in vpeval.c. --- progs/tests/vpeval.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'progs') diff --git a/progs/tests/vpeval.c b/progs/tests/vpeval.c index f07737f973..3e8a732df5 100644 --- a/progs/tests/vpeval.c +++ b/progs/tests/vpeval.c @@ -94,16 +94,16 @@ GLfloat colorPoints[4][4][4] = }; -void +static void initlights(void) { +#if 0 /* no lighting for now */ GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0}; GLfloat position[] = {0.0, 0.0, 2.0, 1.0}; GLfloat mat_diffuse[] = {0.6, 0.6, 0.6, 1.0}; GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0}; GLfloat mat_shininess[] = {50.0}; -#if 0 /* no lighting for now */ glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); @@ -116,7 +116,7 @@ initlights(void) #endif } -void +static void display(void) { glClearColor(.3, .3, .3, 0); @@ -130,7 +130,7 @@ display(void) glFlush(); } -void +static void myinit(int argc, char *argv[]) { glClearColor(0.0, 0.0, 0.0, 1.0); @@ -186,7 +186,7 @@ myinit(int argc, char *argv[]) } } -void +static void myReshape(int w, int h) { glViewport(0, 0, w, h); -- cgit v1.2.3 From 15c6558a2e6b613a6a058bb7f23b678a32e01846 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 02:06:51 -0800 Subject: progs/xdemos: Silence compiler warnings in glxinfo.c. --- progs/xdemos/glxinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'progs') diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c index 23df82f6f9..30cd568064 100644 --- a/progs/xdemos/glxinfo.c +++ b/progs/xdemos/glxinfo.c @@ -116,7 +116,7 @@ print_extension_list(const char *ext) return; width = indent; - printf(indentString); + printf("%s", indentString); i = j = 0; while (1) { if (ext[j] == ' ' || ext[j] == 0) { @@ -126,7 +126,7 @@ print_extension_list(const char *ext) /* start a new line */ printf("\n"); width = indent; - printf(indentString); + printf("%s", indentString); } /* print the extension name between ext[i] and ext[j] */ while (i < j) { -- cgit v1.2.3 From 786899f1532046526bcc94683112d79a5f59a660 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 14:20:17 -0800 Subject: progs/trivial: Silence compiler warnings in tri-blend-max.c --- progs/trivial/tri-blend-max.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'progs') diff --git a/progs/trivial/tri-blend-max.c b/progs/trivial/tri-blend-max.c index b39f8f3f12..b173dab8ec 100644 --- a/progs/trivial/tri-blend-max.c +++ b/progs/trivial/tri-blend-max.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': -- cgit v1.2.3 From 588e9f69c4994d4e5bccdc8257a5aeb1e0b740d8 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 15:47:17 -0800 Subject: progs/trivial: Silence compiler warnings in tri-blend-min.c. --- progs/trivial/tri-blend-min.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'progs') diff --git a/progs/trivial/tri-blend-min.c b/progs/trivial/tri-blend-min.c index 656297c0ce..629139acae 100644 --- a/progs/trivial/tri-blend-min.c +++ b/progs/trivial/tri-blend-min.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': -- cgit v1.2.3 From 0a8d508854c6dd354e611b046e375b8633059a40 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 14 Dec 2009 18:11:57 -0800 Subject: progs/trivial: Silence compiler warnings. --- progs/trivial/tri-blend-revsub.c | 6 +++--- progs/trivial/tri-blend-sub.c | 6 +++--- progs/trivial/tri-blend.c | 6 +++--- progs/trivial/tri-fbo-tex.c | 3 --- progs/trivial/tri-z.c | 6 +++--- 5 files changed, 12 insertions(+), 15 deletions(-) (limited to 'progs') diff --git a/progs/trivial/tri-blend-revsub.c b/progs/trivial/tri-blend-revsub.c index fe225f1f4e..ef1e92c85d 100644 --- a/progs/trivial/tri-blend-revsub.c +++ b/progs/trivial/tri-blend-revsub.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': diff --git a/progs/trivial/tri-blend-sub.c b/progs/trivial/tri-blend-sub.c index cc1aeaf4a4..3c560ae6ef 100644 --- a/progs/trivial/tri-blend-sub.c +++ b/progs/trivial/tri-blend-sub.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': diff --git a/progs/trivial/tri-blend.c b/progs/trivial/tri-blend.c index 58c451c976..f41be89b09 100644 --- a/progs/trivial/tri-blend.c +++ b/progs/trivial/tri-blend.c @@ -81,7 +81,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -97,7 +97,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -109,7 +109,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': diff --git a/progs/trivial/tri-fbo-tex.c b/progs/trivial/tri-fbo-tex.c index 72b4cf3683..8d1f871328 100644 --- a/progs/trivial/tri-fbo-tex.c +++ b/progs/trivial/tri-fbo-tex.c @@ -189,9 +189,6 @@ Key(unsigned char key, int x, int y) static void Init(int argc, char *argv[]) { - static const GLfloat mat[4] = { 1.0, 0.5, 0.5, 1.0 }; - GLint i; - if (!glutExtensionSupported("GL_EXT_framebuffer_object")) { printf("GL_EXT_framebuffer_object not found!\n"); exit(0); diff --git a/progs/trivial/tri-z.c b/progs/trivial/tri-z.c index 014aaa071a..092249dd76 100644 --- a/progs/trivial/tri-z.c +++ b/progs/trivial/tri-z.c @@ -101,7 +101,7 @@ static void drawRightTriangle(void) glEnd(); } -void display(void) +static void display(void) { printf("GL_CLEAR_DEPTH = %.2f, GL_DEPTH_FUNC = %s, DepthRange(%.1f, %.1f)\n", clearVal, funcs[curFunc].str, minZ, maxZ); @@ -124,7 +124,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -136,7 +136,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 'n': -- cgit v1.2.3