gallivm: fix uninitialized-variable warnings
authorMarek Olšák <marek.olsak@amd.com>
Fri, 20 Feb 2015 19:14:33 +0000 (20:14 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 20 Feb 2015 23:16:34 +0000 (00:16 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_init.c
src/gallium/auxiliary/gallivm/lp_bld_sample.c

index b9593decbcaa9725f1af76fdea1a31a4dc39c95e..6133883e149f09abf4155da5ef2ae2da2e861cdc 100644 (file)
@@ -509,7 +509,7 @@ void
 gallivm_compile_module(struct gallivm_state *gallivm)
 {
    LLVMValueRef func;
-   int64_t time_begin;
+   int64_t time_begin = 0;
 
    assert(!gallivm->compiled);
 
index 093c8fcc7482456a9381e05c90cca62e9800a99f..7d18ee592ba2ec1155df6413c6ec2424910f7f2f 100644 (file)
@@ -221,7 +221,7 @@ lp_build_rho(struct lp_build_sample_context *bld,
    struct lp_build_context *coord_bld = &bld->coord_bld;
    struct lp_build_context *rho_bld = &bld->lodf_bld;
    const unsigned dims = bld->dims;
-   LLVMValueRef ddx_ddy[2];
+   LLVMValueRef ddx_ddy[2] = {NULL};
    LLVMBuilderRef builder = bld->gallivm->builder;
    LLVMTypeRef i32t = LLVMInt32TypeInContext(bld->gallivm->context);
    LLVMValueRef index0 = LLVMConstInt(i32t, 0, 0);