Mesa (master): mesa: fix int/uint comparison warnings

Brian Paul brianp at kemper.freedesktop.org
Thu Jan 28 00:08:27 UTC 2010


Module: Mesa
Branch: master
Commit: ca0d048e4e0cc5885cd309cdf9057cfe6044924e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca0d048e4e0cc5885cd309cdf9057cfe6044924e

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jan 27 17:01:54 2010 -0700

mesa: fix int/uint comparison warnings

Reported by Karl Schultz.

---

 src/mesa/main/fbobject.c |    2 +-
 src/mesa/main/teximage.c |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index de1b524..0e6f69f 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -954,7 +954,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
       /* NumSamples == 0 indicates non-multisampling */
       samples = 0;
    }
-   else if (samples > ctx->Const.MaxSamples) {
+   else if (samples > (GLsizei) ctx->Const.MaxSamples) {
       /* note: driver may choose to use more samples than what's requested */
       _mesa_error(ctx, GL_INVALID_VALUE, "%s(samples)", func);
       return;
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 76273b0..da3c6f9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3224,8 +3224,8 @@ compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims,
    }
 
    if (((width == 1 || width == 2) &&
-        (GLuint) width != texImage->Width) ||
-       (width > texImage->Width)) {
+        width != (GLsizei) texImage->Width) ||
+       (width > (GLsizei) texImage->Width)) {
       _mesa_error(ctx, GL_INVALID_VALUE,
                   "glCompressedTexSubImage%uD(width=%d)", dims, width);
       return GL_TRUE;
@@ -3233,8 +3233,8 @@ compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims,
 
    if (dims >= 2) {
       if (((height == 1 || height == 2) &&
-           (GLuint) height != texImage->Height) ||
-          (height > texImage->Height)) {
+           height != (GLsizei) texImage->Height) ||
+          (height > (GLsizei) texImage->Height)) {
          _mesa_error(ctx, GL_INVALID_VALUE,
                      "glCompressedTexSubImage%uD(height=%d)", dims, height);
          return GL_TRUE;
@@ -3243,8 +3243,8 @@ compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims,
 
    if (dims >= 3) {
       if (((depth == 1 || depth == 2) &&
-           (GLuint) depth != texImage->Depth) ||
-          (depth > texImage->Depth)) {
+           depth != (GLsizei) texImage->Depth) ||
+          (depth > (GLsizei) texImage->Depth)) {
          _mesa_error(ctx, GL_INVALID_VALUE,
                      "glCompressedTexSubImage%uD(depth=%d)", dims, depth);
          return GL_TRUE;




More information about the mesa-commit mailing list