gallivm: Silence uninitialized variable warnings.
authorVinson Lee <vlee@vmware.com>
Thu, 21 Oct 2010 18:21:03 +0000 (11:21 -0700)
committerVinson Lee <vlee@vmware.com>
Thu, 21 Oct 2010 18:21:03 +0000 (11:21 -0700)
Fixes these GCC warnings.
gallivm/lp_bld_sample_aos.c: In function 'lp_build_sample_image_nearest':
gallivm/lp_bld_sample_aos.c:271: warning: 't_ipart' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:271: warning: 'r_ipart' may be used uninitialized in this function

src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c

index e824b787d0f00910dbbc844f3d5f6ec5305e1028..d6831a580b3c8c6cc17e55bcfc19e3ebbb3fbebd 100644 (file)
@@ -268,7 +268,7 @@ lp_build_sample_image_nearest(struct lp_build_sample_context *bld,
    LLVMTypeRef i32_vec_type, h16_vec_type, u8n_vec_type;
    LLVMValueRef i32_c8;
    LLVMValueRef width_vec, height_vec, depth_vec;
-   LLVMValueRef s_ipart, t_ipart, r_ipart;
+   LLVMValueRef s_ipart, t_ipart = NULL, r_ipart = NULL;
    LLVMValueRef x_stride;
    LLVMValueRef x_offset, offset;
    LLVMValueRef x_subcoord, y_subcoord, z_subcoord;