On 18 October 2011 18:07, Brian Paul <span dir="ltr">&lt;<a href="mailto:brian.e.paul@gmail.com">brian.e.paul@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
From: Brian Paul &lt;<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>&gt;<br>
<br>
---<br>
 .../drivers/dri/i965/brw_vec4_reg_allocate.cpp     |    2 +-<br>
 1 files changed, 1 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp<br>
index 1ace91f..6de7682 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp<br>
@@ -217,7 +217,7 @@ vec4_visitor::reg_allocate()<br>
       int reg = ra_get_node_reg(g, i);<br>
<br>
       hw_reg_mapping[i] = first_assigned_grf + brw-&gt;vs.ra_reg_to_grf[reg];<br>
-      prog_data-&gt;total_grf = MAX2(prog_data-&gt;total_grf,<br>
+      prog_data-&gt;total_grf = MAX2((int) prog_data-&gt;total_grf,<br>
                                  hw_reg_mapping[i] + virtual_grf_sizes[i]);<br></blockquote><div> </div></div>Since we&#39;re storing the result into an unsigned value, I&#39;d prefer to fix the warning by converting the second argument of MAX2 to GLuint rather than converting the first argument of MAX2 to int.<br>