casts to silence g++ warnings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: osmesa.c,v 1.98 2002/11/14 03:48:03 brianp Exp $ */
|
||||
/* $Id: osmesa.c,v 1.99 2003/02/25 19:25:54 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -165,7 +165,7 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
|
||||
if (mask & DD_FRONT_LEFT_BIT) {
|
||||
if (osmesa->format == OSMESA_COLOR_INDEX) {
|
||||
if (ctx->Color.ClearIndex == 0 &&
|
||||
ctx->Color.IndexMask == ~0 &&
|
||||
ctx->Color.IndexMask == (GLuint) ~0 &&
|
||||
osmesa->rowlength == osmesa->width &&
|
||||
all) {
|
||||
/* clear whole buffer to zeros */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: fakeglx.c,v 1.78 2003/01/14 04:49:07 brianp Exp $ */
|
||||
/* $Id: fakeglx.c,v 1.79 2003/02/25 19:25:58 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -1187,7 +1187,7 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list )
|
||||
return xmvis->vishandle;
|
||||
#else
|
||||
/* create a new vishandle - the cached one may be stale */
|
||||
xmvis->vishandle = _mesa_malloc(sizeof(XVisualInfo));
|
||||
xmvis->vishandle = (XVisualInfo *) _mesa_malloc(sizeof(XVisualInfo));
|
||||
if (xmvis->vishandle) {
|
||||
_mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo));
|
||||
}
|
||||
@@ -1848,7 +1848,7 @@ Fake_glXChooseFBConfig( Display *dpy, int screen,
|
||||
{
|
||||
XMesaVisual xmvis = choose_visual(dpy, screen, attribList);
|
||||
if (xmvis) {
|
||||
GLXFBConfig *config = _mesa_malloc(sizeof(XMesaVisual));
|
||||
GLXFBConfig *config = (GLXFBConfig *) _mesa_malloc(sizeof(XMesaVisual));
|
||||
if (!config) {
|
||||
*nitems = 0;
|
||||
return NULL;
|
||||
@@ -1891,7 +1891,7 @@ Fake_glXGetFBConfigs( Display *dpy, int screen, int *nelements )
|
||||
visuals = XGetVisualInfo(dpy, visMask, &visTemplate, nelements);
|
||||
if (*nelements > 0) {
|
||||
XMesaVisual *results;
|
||||
results = _mesa_malloc(*nelements * sizeof(XMesaVisual));
|
||||
results = (XMesaVisual *) _mesa_malloc(*nelements * sizeof(XMesaVisual));
|
||||
if (!results) {
|
||||
*nelements = 0;
|
||||
return NULL;
|
||||
@@ -1914,7 +1914,7 @@ Fake_glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config )
|
||||
return xmvis->vishandle;
|
||||
#else
|
||||
/* create a new vishandle - the cached one may be stale */
|
||||
xmvis->vishandle = _mesa_malloc(sizeof(XVisualInfo));
|
||||
xmvis->vishandle = (XVisualInfo *) _mesa_malloc(sizeof(XVisualInfo));
|
||||
if (xmvis->vishandle) {
|
||||
_mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo));
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: texstore.c,v 1.52 2003/02/06 13:50:57 brianp Exp $ */
|
||||
/* $Id: texstore.c,v 1.53 2003/02/25 19:25:52 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -1162,7 +1162,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
|
||||
}
|
||||
|
||||
/* copy the data */
|
||||
ASSERT(texImage->CompressedSize == imageSize);
|
||||
ASSERT(texImage->CompressedSize == (GLuint) imageSize);
|
||||
MEMCPY(texImage->Data, data, imageSize);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: s_drawpix.c,v 1.44 2003/01/16 18:57:44 brianp Exp $ */
|
||||
/* $Id: s_drawpix.c,v 1.45 2003/02/25 19:26:00 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -718,7 +718,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
|
||||
/* clamp depth values to [0,1] and convert from floats to ints */
|
||||
{
|
||||
const GLfloat zs = ctx->DepthMaxF;
|
||||
GLint i;
|
||||
GLuint i;
|
||||
for (i = 0; i < span.end; i++) {
|
||||
span.array->z[i] = (GLdepth) (floatSpan[i] * zs + 0.5F);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: s_linetemp.h,v 1.16 2002/11/15 15:05:04 brianp Exp $ */
|
||||
/* $Id: s_linetemp.h,v 1.17 2003/02/25 19:26:01 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -268,8 +268,9 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
|
||||
span.zStep = FloatToFixed(vert1->win[2] - vert0->win[2]) / numPixels;
|
||||
}
|
||||
else {
|
||||
span.z = vert0->win[2];
|
||||
span.zStep = (vert1->win[2] - vert0->win[2]) / numPixels;
|
||||
/* don't use fixed point */
|
||||
span.z = (GLint) vert0->win[2];
|
||||
span.zStep = (GLint) ((vert1->win[2] - vert0->win[2]) / numPixels);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: s_zoom.c,v 1.21 2003/02/21 00:17:58 brianp Exp $ */
|
||||
/* $Id: s_zoom.c,v 1.22 2003/02/25 19:26:02 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -81,7 +81,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span,
|
||||
c0 = (GLint) span->x;
|
||||
c1 = (GLint) (span->x + span->end * ctx->Pixel.ZoomX);
|
||||
#else
|
||||
c0 = (GLint) span->x + skipPixels * ctx->Pixel.ZoomX;
|
||||
c0 = (GLint) (span->x + skipPixels * ctx->Pixel.ZoomX);
|
||||
c1 = (GLint) (span->x + (skipPixels + span->end) * ctx->Pixel.ZoomX);
|
||||
#endif
|
||||
if (c0 == c1) {
|
||||
@@ -158,7 +158,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span,
|
||||
i = span->end + i - 1;
|
||||
}
|
||||
ASSERT(i >= 0);
|
||||
ASSERT(i < span->end);
|
||||
ASSERT(i < (GLint) span->end);
|
||||
COPY_CHAN4(zoomed.array->rgba[j], rgba[i]);
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span,
|
||||
i = span->end + i - 1;
|
||||
}
|
||||
ASSERT(i >= 0);
|
||||
ASSERT(i < span->end);
|
||||
ASSERT(i < (GLint) span->end);
|
||||
zoomed.array->rgba[j][0] = rgb[i][0];
|
||||
zoomed.array->rgba[j][1] = rgb[i][1];
|
||||
zoomed.array->rgba[j][2] = rgb[i][2];
|
||||
@@ -210,7 +210,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span,
|
||||
i = span->end + i - 1;
|
||||
}
|
||||
ASSERT(i >= 0);
|
||||
ASSERT(i < span->end);
|
||||
ASSERT(i < (GLint) span->end);
|
||||
zoomed.array->index[j] = indexes[i];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user