ir_to_mesa: Fix uninitialized member in add_uniform_to_shader.
authorVinson Lee <vlee@freedesktop.org>
Thu, 12 Apr 2012 06:05:44 +0000 (23:05 -0700)
committerVinson Lee <vlee@freedesktop.org>
Fri, 13 Apr 2012 05:43:23 +0000 (22:43 -0700)
Fix uninitialized scalar field defect reported by Coverity.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/program/ir_to_mesa.cpp

index 6f4a095dd0ac24389cfa70b9cdcf2ef9e2030f0a..840648e04495a282d4c8d97c30d103d4ba09d2a4 100644 (file)
@@ -2358,7 +2358,7 @@ class add_uniform_to_shader : public uniform_field_visitor {
 public:
    add_uniform_to_shader(struct gl_shader_program *shader_program,
                         struct gl_program_parameter_list *params)
-      : shader_program(shader_program), params(params)
+      : shader_program(shader_program), params(params), idx(-1)
    {
       /* empty */
    }