summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-03-06 12:08:54 +0100
committerChristian König <[email protected]>2013-03-06 12:08:54 +0100
commit886c5085e3f78affa524bf12ca406a617219cd68 (patch)
tree75db5c3c7e98a3ecd5ed4dc69ae1723cb334cdcf
parenta2124834374bec527f758e4034257c75289330c5 (diff)
radeon/llvm: fix trivial warnings
Signed-off-by: Christian König <[email protected]>
-rw-r--r--src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index 6103d3781cf..f9c87529a5b 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -754,6 +754,8 @@ static void emit_icmp(
case TGSI_OPCODE_ISLT: pred = LLVMIntSLT; break;
default:
assert(!"unknown instruction");
+ pred = 0;
+ break;
}
LLVMValueRef v = LLVMBuildICmp(builder, pred,
@@ -770,10 +772,7 @@ static void emit_ucmp(
struct lp_build_tgsi_context * bld_base,
struct lp_build_emit_data * emit_data)
{
- unsigned pred;
LLVMBuilderRef builder = bld_base->base.gallivm->builder;
- LLVMContextRef context = bld_base->base.gallivm->context;
-
LLVMValueRef v = LLVMBuildFCmp(builder, LLVMRealUGE,
emit_data->args[0], lp_build_const_float(bld_base->base.gallivm, 0.), "");
@@ -802,7 +801,7 @@ static void emit_cmp(
case TGSI_OPCODE_SLT: pred = LLVMRealULT; break;
case TGSI_OPCODE_SNE: pred = LLVMRealUNE; break;
case TGSI_OPCODE_SGT: pred = LLVMRealUGT; break;
- default: assert(!"unknown instruction");
+ default: assert(!"unknown instruction"); pred = 0; break;
}
cond = LLVMBuildFCmp(builder,