diff options
author | Karl Schultz <[email protected]> | 2010-02-13 17:31:58 -0700 |
---|---|---|
committer | Karl Schultz <[email protected]> | 2010-02-13 17:34:04 -0700 |
commit | b30898f4ab533085d97a33638ad0a1cf9ddb1d67 (patch) | |
tree | 7c27558e2905da625b75060628967d3d52fe6728 /src/mesa/shader/slang | |
parent | 5fd2b46a20321d8600d6256bff17ec3ebc9cb510 (diff) |
mesa: Fix compiler warnings
Add explicit casts, fix constant types, fix variable types.
Fixes about 340 warnings in MSFT Visual Studio.
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 2 |
2 files changed, 2 insertions, 2 deletions
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; } |