<p dir="ltr">But if codegen fails, the code is never displayed as I recall. Again, this I'd going from memory...</p>
<div class="gmail_quote">On Jun 5, 2015 4:59 PM, "Martin Peres" <<a href="mailto:martin.peres@linux.intel.com">martin.peres@linux.intel.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/06/15 16:53, Ilia Mirkin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
My recollection is that gcc's analysis is wrong. I can't look at the code now, but I hate patches that appease broken tools. Will take a look when I can get in front of a proper computer though.<br>
<br>
</blockquote>
Nope, GCC is not wrong here. nouveau_codegen can fail and, in this case, it will not set size and code. Size is then used later on to display the binary code.<br>
<br>
By initing the size to 0 and the code to NULL, we make sure that we won't execute the for loop displaying the binary code.<br>
<br>
It really looks like a bug to me! You may however prefer me to fix nouveau_codegen() instead. Your call!<br>
</blockquote></div>