mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 10:50:39 +02:00
Add casts to quiet compiler warnings.
This commit is contained in:
parent
6afdc0bec2
commit
798d83cf67
4 changed files with 22 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue