mesa: Return after assertion failure.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 30 Aug 2010 12:59:24 +0000 (13:59 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 30 Aug 2010 12:59:24 +0000 (13:59 +0100)
Addresses the warnings:
warning: ‘target’ may be used uninitialized in this function
warning: ‘target_string’ may be used uninitialized in this function

src/mesa/program/ir_to_mesa.cpp

index 19f3847ab5b63055f4fb0680b59beeb947dc5a39..af6d7345a54a4d142b35053d2ebdac68f9a952de 100644 (file)
@@ -2456,7 +2456,7 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
       break;
    default:
       assert(!"should not be reached");
-      break;
+      return NULL;
    }
 
    validate_ir_tree(shader->ir);