summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2012-08-02 22:38:24 -0700
committerVinson Lee <[email protected]>2012-08-03 22:28:31 -0700
commit5bce0b51755e465d6aa9077df2167018d2e5150c (patch)
tree89cd894296c832a1f01c8e84119b437f733211c5
parent9d36b3abfd557d8eb6a1a571d387dd53ef64068b (diff)
draw: Ensure channel in convert_to_soa is initialized.
Fixes uninitialized pointer read defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 8d9b5309aff..3400661fb29 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -559,7 +559,7 @@ convert_to_soa(struct gallivm_state *gallivm,
unsigned pixels_per_channel = soa_type.length / TGSI_NUM_CHANNELS;
for (j = 0; j < TGSI_NUM_CHANNELS; ++j) {
- LLVMValueRef channel[LP_MAX_VECTOR_LENGTH];
+ LLVMValueRef channel[LP_MAX_VECTOR_LENGTH] = { 0 };
assert(pixels_per_channel <= LP_MAX_VECTOR_LENGTH);