Mesa (gallium-0.2): mesa: Fix compiler warnings on Windows.

Zack Rusin zack at kemper.freedesktop.org
Thu Oct 2 14:37:24 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: a77976d2ee578d0483c64f2aa41719bbae9c1c97
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a77976d2ee578d0483c64f2aa41719bbae9c1c97

Author: Michal Krol <michal at tungstengraphics.com>
Date:   Wed Oct  1 19:36:04 2008 +0200

mesa: Fix compiler warnings on Windows.

---

 src/mesa/shader/arbprogparse.c     |    2 +-
 src/mesa/shader/slang/slang_link.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 983f61a..448251b 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -2603,7 +2603,7 @@ parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
       /* If we're referencing the Program->Parameters[] array, check if the
        * parameter is really a constant/literal.  If so, set File to CONSTANT.
        */
-      assert(*Index < Program->Base.Parameters->NumParameters);
+      assert(*Index < (GLint) Program->Base.Parameters->NumParameters);
       file = Program->Base.Parameters->Parameters[*Index].Type;
       if (file == PROGRAM_CONSTANT)
          *File = PROGRAM_CONSTANT;
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index d884be2..00e8953 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -408,7 +408,7 @@ _slang_update_inputs_outputs(struct gl_program *prog)
             }
          }
          else if (inst->SrcReg[j].File == PROGRAM_ADDRESS) {
-            maxAddrReg = MAX2(maxAddrReg, inst->SrcReg[j].Index + 1);
+            maxAddrReg = MAX2(maxAddrReg, (GLuint) (inst->SrcReg[j].Index + 1));
          }
       }
       if (inst->DstReg.File == PROGRAM_OUTPUT) {




More information about the mesa-commit mailing list