[Mesa-dev] [PATCH 11/11] glsl: add cast to silence MSVC double->float assignment warning

Brian Paul brianp at vmware.com
Tue Jan 22 16:51:21 PST 2013


---
 src/glsl/s_expression.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp
index 57de9d3..52fa7ae 100644
--- a/src/glsl/s_expression.cpp
+++ b/src/glsl/s_expression.cpp
@@ -79,7 +79,7 @@ read_atom(void *ctx, const char *&src, char *&symbol_buffer)
          int i = strtol(src, &int_end, 10);
          // If strtod matched more characters, it must have a decimal part
          if (float_end > int_end)
-            expr = new(ctx) s_float(f);
+            expr = new(ctx) s_float((float) f);
          else
             expr = new(ctx) s_int(i);
       } else {
-- 
1.7.3.4



More information about the mesa-dev mailing list