summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_validate.cpp
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-03-13 16:05:26 +0000
committerDave Airlie <[email protected]>2012-03-25 17:12:24 +0100
commitba3a4d79a7bad959c0d9efbe0daa8d73c281d664 (patch)
treed939e12cfee0a44d30a3ce26c1d2d9cd3b5b27e8 /src/glsl/ir_validate.cpp
parentb78a77f979b21a84aecb6fa4f19a2ed51a48c306 (diff)
glsl: fix compiling warning from gcc 4.7
ir_validate.cpp: In member function ‘virtual ir_visitor_status ir_validate::visit_leave(ir_swizzle*)’: ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::x’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing] ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::y’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing] ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::z’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing] ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::w’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing] Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r--src/glsl/ir_validate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 20a0377d456..101d9992da2 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -455,7 +455,7 @@ ir_validate::visit_leave(ir_expression *ir)
ir_visitor_status
ir_validate::visit_leave(ir_swizzle *ir)
{
- int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w};
+ unsigned int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w};
for (unsigned int i = 0; i < ir->type->vector_elements; i++) {
if (chans[i] >= ir->val->type->vector_elements) {