mesa: fix MSVC signed/unsigned warnings in context.c
[mesa.git] / src / mesa / main / fbobject.c
index 2be61fb3c805d7ecffb6a251be36df1f0b411d96..0758d55574a886bf6ff76ea5023265a4fd49dc06 100644 (file)
@@ -2059,7 +2059,8 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
       }
       else if ((texObj->Target == GL_TEXTURE_1D_ARRAY_EXT) ||
                (texObj->Target == GL_TEXTURE_2D_ARRAY_EXT)) {
-         if (zoffset < 0 || zoffset >= ctx->Const.MaxArrayTextureLayers) {
+         if (zoffset < 0 ||
+             zoffset >= (GLint) ctx->Const.MaxArrayTextureLayers) {
             _mesa_error(ctx, GL_INVALID_VALUE,
                         "glFramebufferTexture%sEXT(layer)", caller);
             return;
@@ -3151,7 +3152,7 @@ invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments,
          case GL_COLOR_ATTACHMENT13:
          case GL_COLOR_ATTACHMENT14:
          case GL_COLOR_ATTACHMENT15: {
-            const int k = attachments[i] - GL_COLOR_ATTACHMENT0;
+            unsigned k = attachments[i] - GL_COLOR_ATTACHMENT0;
             if (k >= ctx->Const.MaxColorAttachments) {
                _mesa_error(ctx, GL_INVALID_OPERATION,
                            "%s(attachment >= max. color attachments)", name);