summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2002-10-17 22:26:06 +0000
committerKarl Schultz <[email protected]>2002-10-17 22:26:06 +0000
commit798d83cf67098a7df293c711e0d2c8c296fc4c8f (patch)
treecf89db0ab067d627d3fbb412eba713d4ae3700f5 /src/mesa/main
parent6afdc0bec2e75374875578375772aa7776774851 (diff)
Add casts to quiet compiler warnings.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_loopback.c6
-rw-r--r--src/mesa/main/attrib.c6
-rw-r--r--src/mesa/main/teximage.c28
-rw-r--r--src/mesa/main/texstate.c4
4 files changed, 22 insertions, 22 deletions
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index 6838f4f7c16..0addf1ef55d 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -1,4 +1,4 @@
-/* $Id: api_loopback.c,v 1.15 2002/01/14 16:06:35 brianp Exp $ */
+/* $Id: api_loopback.c,v 1.16 2002/10/17 22:26:06 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -1408,7 +1408,7 @@ loopback_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
static void
loopback_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
{
- ATTRIB(index, (GLfloat) x, y, 0.0F, 1.0F);
+ ATTRIB(index, (GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
static void
@@ -1481,7 +1481,7 @@ loopback_VertexAttrib2fvNV(GLuint index, const GLfloat *v)
static void
loopback_VertexAttrib2dvNV(GLuint index, const GLdouble *v)
{
- ATTRIB(index, (GLfloat) v[0], (GLdouble) v[1], 0.0F, 1.0F);
+ ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
static void
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 5c02a6c41ed..32a87f33ce3 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.73 2002/10/11 21:42:08 brianp Exp $ */
+/* $Id: attrib.c,v 1.74 2002/10/17 22:26:06 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -421,8 +421,8 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
for (i=0;i<MAX_CLIP_PLANES;i++) {
const GLuint mask = 1 << i;
if ((ctx->Transform.ClipPlanesEnabled & mask) != (enable->ClipPlanes & mask))
- _mesa_set_enable(ctx, (GLenum) (GL_CLIP_PLANE0 + i),
- (enable->ClipPlanes & mask) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, (GLenum) (GL_CLIP_PLANE0 + i),
+ (GLboolean) ((enable->ClipPlanes & mask) ? GL_TRUE : GL_FALSE));
}
TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial,
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index afc5db761de..792fe352c35 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.119 2002/10/10 14:12:09 brianp Exp $ */
+/* $Id: teximage.c,v 1.120 2002/10/17 22:26:06 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -1162,12 +1162,12 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
/* size must be multiple of 4 or equal to whole texture size */
- if ((width & 3) && width != texImage->Width) {
+ if ((width & 3) && (GLuint) width != texImage->Width) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%D(width)", dimensions);
return GL_TRUE;
}
- if ((height & 3) && height != texImage->Height) {
+ if ((height & 3) && (GLuint) height != texImage->Height) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%D(width)", dimensions);
return GL_TRUE;
@@ -1411,12 +1411,12 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
/* size must be multiple of 4 */
- if ((width & 3) != 0 && width != teximage->Width) {
+ if ((width & 3) != 0 && (GLuint) width != teximage->Width) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glCopyTexSubImage%D(width)", dimensions);
return GL_TRUE;
}
- if ((height & 3) != 0 && height != teximage->Height) {
+ if ((height & 3) != 0 && (GLuint) height != teximage->Height) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glCopyTexSubImage%D(height)", dimensions);
return GL_TRUE;
@@ -2741,13 +2741,13 @@ _mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
assert(texImage);
- if (format != texImage->IntFormat) {
+ if ((GLint) format != texImage->IntFormat) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCompressedTexSubImage1D(format)");
return;
}
- if ((width == 1 || width == 2) && width != texImage->Width) {
+ if ((width == 1 || width == 2) && (GLuint) width != texImage->Width) {
_mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage1D(width)");
return;
}
@@ -2790,14 +2790,14 @@ _mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
assert(texImage);
- if (format != texImage->IntFormat) {
+ if ((GLint) format != texImage->IntFormat) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCompressedTexSubImage2D(format)");
return;
}
- if (((width == 1 || width == 2) && width != texImage->Width) ||
- ((height == 1 || height == 2) && height != texImage->Height)) {
+ if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) ||
+ ((height == 1 || height == 2) && (GLuint) height != texImage->Height)) {
_mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage2D(size)");
return;
}
@@ -2840,15 +2840,15 @@ _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
assert(texImage);
- if (format != texImage->IntFormat) {
+ if ((GLint) format != texImage->IntFormat) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCompressedTexSubImage3D(format)");
return;
}
- if (((width == 1 || width == 2) && width != texImage->Width) ||
- ((height == 1 || height == 2) && height != texImage->Height) ||
- ((depth == 1 || depth == 2) && depth != texImage->Depth)) {
+ if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) ||
+ ((height == 1 || height == 2) && (GLuint) height != texImage->Height) ||
+ ((depth == 1 || depth == 2) && (GLuint) depth != texImage->Depth)) {
_mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage3D(size)");
return;
}
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index e5c82e1514d..0da213404b9 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.80 2002/10/04 19:10:08 brianp Exp $ */
+/* $Id: texstate.c,v 1.81 2002/10/17 22:26:06 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -554,7 +554,7 @@ _mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param )
p[3] = INT_TO_FLOAT( param[3] );
}
else {
- p[0] = (GLint) param[0];
+ p[0] = (GLfloat) param[0];
p[1] = p[2] = p[3] = 0; /* init to zero, just to be safe */
}
_mesa_TexEnvfv( target, pname, p );