summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Schultz <kschultz@freedesktop.org>2002-10-18 17:47:35 +0000
committerKarl Schultz <kschultz@freedesktop.org>2002-10-18 17:47:35 +0000
commit53d30c56eb1a0865a6a88cf05c4c74673d41b2a4 (patch)
treeebc4dab204774504fb7c3cd62f147819258f3a1b
parent2ce0654ebabc7fc6a2881f51e496e4e1f7533087 (diff)
Quiet compiler warnings.
-rw-r--r--progs/demos/isosurf.c11
-rw-r--r--progs/demos/tessdemo.c17
-rw-r--r--progs/redbook/pickdepth.c4
-rw-r--r--progs/redbook/picksquare.c4
-rw-r--r--progs/redbook/select.c4
-rw-r--r--progs/samples/loadppm.c2
-rw-r--r--progs/tests/manytex.c4
-rw-r--r--progs/tests/multipal.c4
-rw-r--r--progs/tests/texwrap.c4
9 files changed, 28 insertions, 26 deletions
diff --git a/progs/demos/isosurf.c b/progs/demos/isosurf.c
index 160886f9ce..12125aac96 100644
--- a/progs/demos/isosurf.c
+++ b/progs/demos/isosurf.c
@@ -1,4 +1,4 @@
-/* $Id: isosurf.c,v 1.14 2002/01/04 09:47:17 gareth Exp $ */
+/* $Id: isosurf.c,v 1.15 2002/10/18 17:47:35 kschultz Exp $ */
/*
* Display an isosurface of 3-D wind speed volume.
@@ -32,6 +32,7 @@
#include <math.h>
#ifdef _WIN32
#include <windows.h>
+#undef CLIP_MASK
#endif
#define GL_GLEXT_LEGACY
#include "GL/glut.h"
@@ -84,7 +85,7 @@
#define POLYGON_MASK (POLYGON_FILL|POLYGON_LINE)
#define MAXVERTS 10000
-static GLuint maxverts = MAXVERTS;
+static GLint maxverts = MAXVERTS;
static float data[MAXVERTS][6];
static float compressed_data[MAXVERTS][6];
static float expanded_data[MAXVERTS*3][6];
@@ -337,7 +338,7 @@ static void make_tri_indices( void )
{
unsigned int *v = tri_indices;
unsigned int parity = 0;
- unsigned int i, j;
+ int i, j;
for (j=2;j<numverts;j++,parity^=1) {
if (parity) {
@@ -367,9 +368,9 @@ static void make_tri_indices( void )
#define MIN(x,y) (x < y) ? x : y
-static void draw_surface( int with_state )
+static void draw_surface( unsigned int with_state )
{
- GLuint i, j;
+ GLint i, j;
if (with_state & DISPLAYLIST) {
if ((with_state & (RENDER_STYLE_MASK|PRIMITIVE_MASK|MATERIAL_MASK)) !=
diff --git a/progs/demos/tessdemo.c b/progs/demos/tessdemo.c
index abde73054c..581dec90d5 100644
--- a/progs/demos/tessdemo.c
+++ b/progs/demos/tessdemo.c
@@ -1,4 +1,4 @@
-/* $Id: tessdemo.c,v 1.12 2002/07/12 15:54:02 brianp Exp $ */
+/* $Id: tessdemo.c,v 1.13 2002/10/18 17:47:36 kschultz Exp $ */
/*
* A demo of the GLU polygon tesselation functions written by Bogdan Sikorski.
@@ -90,7 +90,7 @@ static void GLCALLBACK edge_callback( GLenum flag )
static void GLCALLBACK end_callback()
{
- GLint i;
+ GLuint i;
glBegin( GL_LINES );
@@ -310,6 +310,7 @@ static void mouse_clicked( int button, int state, int x, int y )
static void display( void )
{
GLuint i,j;
+ GLsizei ii, jj;
GLuint point_cnt;
glClear( GL_COLOR_BUFFER_BIT );
@@ -321,12 +322,12 @@ static void display( void )
glBegin( GL_LINES );
- for ( i = 0 ; i < width ; i += 10 ) {
- for ( j = 0 ; j < height ; j += 10 ) {
- glVertex2i( 0, j );
- glVertex2i( width, j );
- glVertex2i( i, height );
- glVertex2i( i, 0 );
+ for ( ii = 0 ; ii < width ; ii += 10 ) {
+ for ( jj = 0 ; jj < height ; jj += 10 ) {
+ glVertex2i( 0, jj );
+ glVertex2i( width, jj );
+ glVertex2i( ii, height );
+ glVertex2i( ii, 0 );
}
}
diff --git a/progs/redbook/pickdepth.c b/progs/redbook/pickdepth.c
index 4b95d245ce..ad5bdc8199 100644
--- a/progs/redbook/pickdepth.c
+++ b/progs/redbook/pickdepth.c
@@ -103,8 +103,8 @@ drawRects(GLenum mode)
void
processHits(GLint hits, GLuint buffer[])
{
- unsigned int i, j;
- GLuint names, *ptr;
+ GLint i;
+ GLuint j, names, *ptr;
printf("hits = %d\n", hits);
ptr = (GLuint *) buffer;
diff --git a/progs/redbook/picksquare.c b/progs/redbook/picksquare.c
index b68117c278..636edc97b4 100644
--- a/progs/redbook/picksquare.c
+++ b/progs/redbook/picksquare.c
@@ -87,8 +87,8 @@ void drawSquares(GLenum mode)
*/
void processHits (GLint hits, GLuint buffer[])
{
- unsigned int i, j;
- GLuint ii = 0, jj = 0, names, *ptr;
+ GLint i;
+ GLuint j, ii = 0, jj = 0, names, *ptr;
printf ("hits = %d\n", hits);
ptr = (GLuint *) buffer;
diff --git a/progs/redbook/select.c b/progs/redbook/select.c
index 4f413e73ce..928373b879 100644
--- a/progs/redbook/select.c
+++ b/progs/redbook/select.c
@@ -124,8 +124,8 @@ void drawScene (void)
*/
void processHits (GLint hits, GLuint buffer[])
{
- unsigned int i, j;
- GLuint names, *ptr;
+ GLint i;
+ GLuint j, names, *ptr;
printf ("hits = %d\n", hits);
ptr = (GLuint *) buffer;
diff --git a/progs/samples/loadppm.c b/progs/samples/loadppm.c
index 5d3e3ab56f..b4b1b387fd 100644
--- a/progs/samples/loadppm.c
+++ b/progs/samples/loadppm.c
@@ -1,6 +1,6 @@
typedef struct {
- int sizeX, sizeY;
+ size_t sizeX, sizeY;
GLubyte *data;
} PPMImage;
diff --git a/progs/tests/manytex.c b/progs/tests/manytex.c
index 0f8f9574be..8add125a69 100644
--- a/progs/tests/manytex.c
+++ b/progs/tests/manytex.c
@@ -1,4 +1,4 @@
-/* $Id: manytex.c,v 1.3 2000/11/09 16:53:26 brianp Exp $ */
+/* $Id: manytex.c,v 1.4 2002/10/18 17:47:36 kschultz Exp $ */
/*
* test handling of many texture maps
@@ -28,7 +28,7 @@ static GLboolean MipMap = GL_FALSE;
static GLboolean LinearFilter = GL_FALSE;
static GLboolean RandomSize = GL_FALSE;
static GLint Rows, Columns;
-static GLuint LowPriorityCount = 0;
+static GLint LowPriorityCount = 0;
static void Idle( void )
diff --git a/progs/tests/multipal.c b/progs/tests/multipal.c
index 54483afa3b..a2efab874a 100644
--- a/progs/tests/multipal.c
+++ b/progs/tests/multipal.c
@@ -1,4 +1,4 @@
-/* $Id: multipal.c,v 1.3 2002/10/18 13:23:19 brianp Exp $ */
+/* $Id: multipal.c,v 1.4 2002/10/18 17:47:36 kschultz Exp $ */
/*
* Test multitexture and paletted textures.
@@ -213,7 +213,7 @@ static void SpecialKey( int key, int x, int y )
static void load_tex(const char *fname, int channel)
{
GLubyte *image;
- GLenum format, type;
+ GLenum format;
GLint w, h;
GLubyte *grayImage;
int i;
diff --git a/progs/tests/texwrap.c b/progs/tests/texwrap.c
index fc6a8cbc1b..108c67d4d1 100644
--- a/progs/tests/texwrap.c
+++ b/progs/tests/texwrap.c
@@ -1,4 +1,4 @@
-/* $Id: texwrap.c,v 1.3 2002/10/17 17:39:37 brianp Exp $ */
+/* $Id: texwrap.c,v 1.4 2002/10/18 17:47:36 kschultz Exp $ */
/*
* Test texture wrap modes.
@@ -82,7 +82,7 @@ PrintString(const char *s)
static void Display( void )
{
- GLint i, j;
+ GLenum i, j;
GLint offset;
GLfloat version;