<p dir="ltr">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.</p>
<div class="gmail_quote">On Jun 5, 2015 3:32 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">This should prevent any segfault when the codegen fails.<br>
<br>
Signed-off-by: Martin Peres <<a href="mailto:martin.peres@linux.intel.com">martin.peres@linux.intel.com</a>><br>
---<br>
 src/gallium/drivers/nouveau/nouveau_compiler.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/gallium/drivers/nouveau/nouveau_compiler.c b/src/gallium/drivers/nouveau/nouveau_compiler.c<br>
index 8660498..ca128b5 100644<br>
--- a/src/gallium/drivers/nouveau/nouveau_compiler.c<br>
+++ b/src/gallium/drivers/nouveau/nouveau_compiler.c<br>
@@ -144,7 +144,7 @@ main(int argc, char *argv[])<br>
    const char *filename = NULL;<br>
    FILE *f;<br>
    char text[65536] = {0};<br>
-   unsigned size, *code;<br>
+   unsigned size = 0, *code = NULL;<br>
<br>
    for (i = 1; i < argc; i++) {<br>
       if (!strcmp(argv[i], "-a"))<br>
--<br>
2.4.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>