From 4d7a8194c5763f70ba559f32f58dfda36237b666 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sun, 16 Aug 2009 21:07:15 +0100 Subject: llvmpipe: Silence compiler warnings. --- src/gallium/drivers/llvmpipe/lp_bld_arit.c | 19 +++++++++++-------- src/gallium/drivers/llvmpipe/lp_bld_swizzle.c | 2 -- src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c | 2 ++ src/gallium/drivers/llvmpipe/lp_quad_fs.c | 1 - 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src/gallium/drivers/llvmpipe') diff --git a/src/gallium/drivers/llvmpipe/lp_bld_arit.c b/src/gallium/drivers/llvmpipe/lp_bld_arit.c index aec3e297f4a..b3429c31477 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_arit.c @@ -746,8 +746,11 @@ lp_build_exp2_approx(struct lp_build_context *bld, const union lp_type type = bld->type; LLVMTypeRef vec_type = lp_build_vec_type(type); LLVMTypeRef int_vec_type = lp_build_int_vec_type(type); - LLVMValueRef ipart; - LLVMValueRef fpart, expipart, expfpart, res; + LLVMValueRef ipart = NULL; + LLVMValueRef fpart = NULL; + LLVMValueRef expipart = NULL; + LLVMValueRef expfpart = NULL; + LLVMValueRef res = NULL; if(p_exp2_int_part || p_frac_part || p_exp2) { /* TODO: optimize the constant case */ @@ -841,12 +844,12 @@ lp_build_log2_approx(struct lp_build_context *bld, LLVMValueRef mantmask = lp_build_int_const_uni(type, 0x007fffff); LLVMValueRef one = LLVMConstBitCast(bld->one, int_vec_type); - LLVMValueRef i; - LLVMValueRef exp; - LLVMValueRef mant; - LLVMValueRef logexp; - LLVMValueRef logmant; - LLVMValueRef res; + LLVMValueRef i = NULL; + LLVMValueRef exp = NULL; + LLVMValueRef mant = NULL; + LLVMValueRef logexp = NULL; + LLVMValueRef logmant = NULL; + LLVMValueRef res = NULL; if(p_exp || p_floor_log2 || p_log2) { /* TODO: optimize the constant case */ diff --git a/src/gallium/drivers/llvmpipe/lp_bld_swizzle.c b/src/gallium/drivers/llvmpipe/lp_bld_swizzle.c index 627890a3af1..7fd25e9dd69 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_swizzle.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_swizzle.c @@ -137,8 +137,6 @@ lp_build_select(struct lp_build_context *bld, LLVMValueRef a, LLVMValueRef b) { - const union lp_type type = bld->type; - if(a == b) return a; diff --git a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c index f60e79e6beb..4ec1b9dbd85 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c @@ -140,6 +140,7 @@ emit_fetch( default: assert( 0 ); + return bld->base.undef; } break; @@ -153,6 +154,7 @@ emit_fetch( default: assert( 0 ); + return bld->base.undef; } switch( tgsi_util_get_full_src_register_sign_mode( reg, chan_index ) ) { diff --git a/src/gallium/drivers/llvmpipe/lp_quad_fs.c b/src/gallium/drivers/llvmpipe/lp_quad_fs.c index 5c37fab8e6f..c428987a7d4 100644 --- a/src/gallium/drivers/llvmpipe/lp_quad_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_quad_fs.c @@ -201,7 +201,6 @@ shade_quads(struct quad_stage *qs, struct quad_header *quads[], unsigned nr) { - struct quad_shade_stage *qss = quad_shade_stage( qs ); unsigned i, pass = 0; for (i = 0; i < nr; i++) { -- cgit v1.2.3