mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
Add casts to quiet compiler warnings.
This commit is contained in:
parent
5f1651ddc5
commit
d3975341e7
2 changed files with 10 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: texstore.c,v 1.45 2002/10/24 23:57:21 brianp Exp $ */
|
||||
/* $Id: texstore.c,v 1.46 2002/10/28 23:01:24 kschultz Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -1909,7 +1909,8 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
|
|||
/* Find convertFormat - the format that do_row() will process */
|
||||
if (srcImage->IsCompressed) {
|
||||
/* setup for compressed textures */
|
||||
GLint row, components, size;
|
||||
GLuint row;
|
||||
GLint components, size;
|
||||
GLchan *dst;
|
||||
|
||||
assert(texObj->Target == GL_TEXTURE_2D);
|
||||
|
|
@ -1946,7 +1947,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
|
|||
/* decompress base image here */
|
||||
dst = (GLchan *) srcData;
|
||||
for (row = 0; row < srcImage->Height; row++) {
|
||||
GLint col;
|
||||
GLuint col;
|
||||
for (col = 0; col < srcImage->Width; col++) {
|
||||
(*srcImage->FetchTexel)(srcImage, col, row, 0, (GLvoid *) dst);
|
||||
dst += components;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: s_texture.c,v 1.73 2002/10/24 23:57:24 brianp Exp $ */
|
||||
/* $Id: s_texture.c,v 1.74 2002/10/28 23:01:24 kschultz Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
U = 1.0F - (S - (GLfloat) flr); /* flr is odd */ \
|
||||
else \
|
||||
U = S - (GLfloat) flr; /* flr is even */ \
|
||||
U = (U * SIZE) - 0.5; \
|
||||
U = (U * SIZE) - 0.5F; \
|
||||
I0 = IFLOOR(U); \
|
||||
I1 = I0 + 1; \
|
||||
if (I0 < 0) \
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
I1 = SIZE - 1; \
|
||||
} \
|
||||
else if (wrapMode == GL_MIRROR_CLAMP_ATI) { \
|
||||
U = fabs(S); \
|
||||
U = (GLfloat) fabs(S); \
|
||||
if (U >= 1.0F) \
|
||||
U = (GLfloat) SIZE; \
|
||||
else \
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
I1 = I0 + 1; \
|
||||
} \
|
||||
else if (wrapMode == GL_MIRROR_CLAMP_TO_EDGE_ATI) { \
|
||||
U = fabs(S); \
|
||||
U = (GLfloat) fabs(S); \
|
||||
if (U >= 1.0F) \
|
||||
U = (GLfloat) SIZE; \
|
||||
else \
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
else if (wrapMode == GL_MIRROR_CLAMP_ATI) { \
|
||||
/* s limited to [0,1] */ \
|
||||
/* i limited to [0,size-1] */ \
|
||||
const GLfloat u = fabs(S); \
|
||||
const GLfloat u = (GLfloat) fabs(S); \
|
||||
if (u <= 0.0F) \
|
||||
I = 0; \
|
||||
else if (u >= 1.0F) \
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
/* i limited to [0, size-1] */ \
|
||||
const GLfloat min = 1.0F / (2.0F * SIZE); \
|
||||
const GLfloat max = 1.0F - min; \
|
||||
const GLfloat u = fabs(S); \
|
||||
const GLfloat u = (GLfloat) fabs(S); \
|
||||
if (u < min) \
|
||||
I = 0; \
|
||||
else if (u > max) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue