gallivm: fix warning: ‘value’ may be used uninitialized in this function
authorMarek Olšák <maraeo@gmail.com>
Wed, 27 Apr 2011 11:05:53 +0000 (13:05 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 27 Apr 2011 11:16:35 +0000 (13:16 +0200)
The path where it's uninitialized is guarded by an assert.

src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c

index d1585c8e2b7598a667140eedc82504f2a53d3f45..d8adb9fbfaf1d2e91e4eb4b90594a204875e5d30 100644 (file)
@@ -2565,7 +2565,7 @@ lp_build_system_values_array(struct gallivm_state *gallivm,
 
    for (i = 0; i < info->num_system_values; i++) {
       LLVMValueRef index = lp_build_const_int32(gallivm, i * 4);
-      LLVMValueRef ptr, value;
+      LLVMValueRef ptr, value = 0;
 
       switch (info->system_value_semantic_name[i]) {
       case TGSI_SEMANTIC_INSTANCEID: