Mesa (mesa_7_6_branch): progs/trivial: Silence compiler warnings.

Vinson Lee vlee at kemper.freedesktop.org
Tue Dec 15 02:12:53 UTC 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 0a8d508854c6dd354e611b046e375b8633059a40
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a8d508854c6dd354e611b046e375b8633059a40

Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Dec 14 18:11:57 2009 -0800

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(-)

diff --git a/progs/trivial/tri-blend-revsub.c b/progs/trivial/tri-blend-revsub.c
index fe225f1..ef1e92c 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 cc1aeaf..3c560ae 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 58c451c..f41be89 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 72b4cf3..8d1f871 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 014aaa0..092249d 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':




More information about the mesa-commit mailing list