OSDN Git Service

mesa: add casts to fix MSVC warnings in multisample.c
authorBrian Paul <brianp@vmware.com>
Mon, 8 Jul 2013 15:59:40 +0000 (09:59 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 12 Jul 2013 14:19:49 +0000 (08:19 -0600)
src/mesa/main/multisample.c

index 8b974c1..bd97c50 100644 (file)
@@ -80,7 +80,7 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
 
    switch (pname) {
    case GL_SAMPLE_POSITION: {
-      if (index >= ctx->DrawBuffer->Visual.samples) {
+      if ((int) index >= ctx->DrawBuffer->Visual.samples) {
          _mesa_error( ctx, GL_INVALID_VALUE, "glGetMultisamplefv(index)" );
          return;
       }
@@ -197,5 +197,6 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target,
     * "... or if samples is greater than MAX_SAMPLES, then the error
     * INVALID_VALUE is generated"
     */
-   return samples > ctx->Const.MaxSamples ? GL_INVALID_VALUE : GL_NO_ERROR;
+   return (GLuint) samples > ctx->Const.MaxSamples
+      ? GL_INVALID_VALUE : GL_NO_ERROR;
 }