From b30898f4ab533085d97a33638ad0a1cf9ddb1d67 Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Sat, 13 Feb 2010 17:31:58 -0700 Subject: mesa: Fix compiler warnings Add explicit casts, fix constant types, fix variable types. Fixes about 340 warnings in MSFT Visual Studio. --- src/mesa/shader/slang/slang_codegen.c | 2 +- src/mesa/shader/slang/slang_compile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/shader/slang') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 83098b7350e..fe4bddf9ad2 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -3117,7 +3117,7 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) if (start >= end) return GL_FALSE; /* degenerate case */ - if (end - start > MAX_FOR_LOOP_UNROLL_ITERATIONS) { + if ((GLuint)(end - start) > MAX_FOR_LOOP_UNROLL_ITERATIONS) { slang_info_log_print(A->log, "Note: 'for (%s=%d; %s<%d; ++%s)' is too" " many iterations to unroll", diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 1dce3adf895..33964e0c3b6 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -239,7 +239,7 @@ parse_general_number(slang_parse_ctx *ctx, float *number) } parse_identifier_str(ctx, &flt); - flt = strdup(flt); + flt = _mesa_strdup(flt); if (!flt) { return 0; } -- cgit v1.2.3