summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-05-04 15:11:06 +0000
committerBrian Paul <[email protected]>2004-05-04 15:11:06 +0000
commitbdd15b5749b45929fa642c3e47997f52eb07fbe5 (patch)
tree103b77f6cd3e845f0816092a7e21a57ec6f98a2c /src/mesa/main
parent33ffbd1c58dc8582f67d946f9eb26127e9851a10 (diff)
Fix minor warnings found with g++.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h2
-rw-r--r--src/mesa/main/texcompress_fxt1.c6
-rw-r--r--src/mesa/main/texcompress_s3tc.c8
-rw-r--r--src/mesa/main/texstore.c10
4 files changed, 12 insertions, 14 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index d021ffc4ff4..e045c1f35b8 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1066,7 +1066,7 @@ struct gl_texture_format {
GLubyte IndexBits;
GLubyte DepthBits;
- GLint TexelBytes; /**< Bytes per texel, 0 if compressed format */
+ GLuint TexelBytes; /**< Bytes per texel, 0 if compressed format */
StoreTexImageFunc StoreImage;
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index e6545123712..5a37a259c73 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -106,7 +106,7 @@ texstore_rgb_fxt1(STORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGB_FXT1_3DFX,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
compress_fxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
dst, dstRowStride);
@@ -161,7 +161,7 @@ texstore_rgba_fxt1(STORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_FXT1_3DFX,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
compress_fxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
dst, dstRowStride);
@@ -274,5 +274,5 @@ compress_fxt1 (GLcontext *ctx,
GLint dstRowStride)
{
/* here be dragons */
- return -1;
+ return 0;
}
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 07ca6b0f014..08697f46c42 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -91,7 +91,7 @@ texstore_rgb_dxt1(STORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_dxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
@@ -148,7 +148,7 @@ texstore_rgba_dxt1(STORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_dxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
dst, dstRowStride);
@@ -202,7 +202,7 @@ texstore_rgba_dxt3(STORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_rgba_dxt3(ctx, srcWidth, srcHeight, pixels,
srcRowStride, dst, dstRowStride);
@@ -256,7 +256,7 @@ texstore_rgba_dxt5(STORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_rgba_dxt5(ctx, srcWidth, srcHeight, pixels,
srcRowStride, dst, dstRowStride);
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index ea7d7cebb17..73126ef9492 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -618,9 +618,8 @@ _mesa_texstore_rgba(GLcontext *ctx, GLuint dims,
for (img = 0; img < srcDepth; img++) {
const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
srcWidth, srcFormat, srcType);
- GLchan *srcRow = _mesa_image_address(srcPacking, srcAddr, srcWidth,
- srcHeight, srcFormat, srcType,
- img, 0, 0);
+ GLchan *srcRow = (GLchan *) _mesa_image_address(srcPacking, srcAddr,
+ srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLchan *dstRow = dstImage;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
@@ -1044,9 +1043,8 @@ _mesa_texstore_rgb888(STORE_PARAMS)
for (img = 0; img < srcDepth; img++) {
const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
srcWidth, srcFormat, srcType);
- GLubyte *srcRow = _mesa_image_address(srcPacking, srcAddr, srcWidth,
- srcHeight, srcFormat, srcType,
- img, 0, 0);
+ GLubyte *srcRow = (GLubyte *) _mesa_image_address(srcPacking, srcAddr,
+ srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLubyte *dstRow = dstImage;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {