summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
authorBrian <brian@nostromo.localnet.net>2007-01-23 11:46:02 -0700
committerBrian <brian@nostromo.localnet.net>2007-01-23 11:46:02 -0700
commit18d1fdebebcb52e7fcf50e62c4c02862d173af51 (patch)
tree4b1ebe71f1c6e8a45278fcab30dacd4d859896a6 /src/mesa/swrast/s_readpix.c
parentd46093b8d56f6d89b341d7437c5185ca6be597af (diff)
fixes for C++ warnings/errors
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 128ce0afb3..27f4736c39 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -94,8 +94,8 @@ read_depth_pixels( GLcontext *ctx,
/* clipping should have been done already */
ASSERT(x >= 0);
ASSERT(y >= 0);
- ASSERT(x + width <= rb->Width);
- ASSERT(y + height <= rb->Height);
+ ASSERT(x + width <= (GLint) rb->Width);
+ ASSERT(y + height <= (GLint) rb->Height);
/* width should never be > MAX_WIDTH since we did clipping earlier */
ASSERT(width <= MAX_WIDTH);
@@ -210,8 +210,8 @@ fast_read_rgba_pixels( GLcontext *ctx,
ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB);
/* clipping should have already been done */
- ASSERT(x + width <= rb->Width);
- ASSERT(y + height <= rb->Height);
+ ASSERT(x + width <= (GLint) rb->Width);
+ ASSERT(y + height <= (GLint) rb->Height);
/* check for things we can't handle here */
if (transferOps ||
@@ -223,8 +223,9 @@ fast_read_rgba_pixels( GLcontext *ctx,
if (format == GL_RGBA && rb->DataType == type) {
const GLint dstStride = _mesa_image_row_stride(packing, width,
format, type);
- GLubyte *dest = _mesa_image_address2d(packing, pixels, width, height,
- format, type, 0, 0);
+ GLubyte *dest
+ = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
+ format, type, 0, 0);
GLint row;
ASSERT(rb->GetRow);
for (row = 0; row < height; row++) {
@@ -239,8 +240,9 @@ fast_read_rgba_pixels( GLcontext *ctx,
type == GL_UNSIGNED_BYTE) {
const GLint dstStride = _mesa_image_row_stride(packing, width,
format, type);
- GLubyte *dest = _mesa_image_address2d(packing, pixels, width, height,
- format, type, 0, 0);
+ GLubyte *dest
+ = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
+ format, type, 0, 0);
GLint row;
ASSERT(rb->GetRow);
for (row = 0; row < height; row++) {
@@ -396,8 +398,9 @@ read_rgba_pixels( GLcontext *ctx,
= _mesa_image_row_stride(packing, width, format, type);
GLfloat (*rgba)[4] = swrast->SpanArrays->color.sz4.rgba;
GLint row;
- GLubyte *dst = _mesa_image_address2d(packing, pixels, width, height,
- format, type, 0, 0);
+ GLubyte *dst
+ = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
+ format, type, 0, 0);
for (row = 0; row < height; row++, y++) {