gallivm: Remove dead code in lp_build_compare_ext.
authorVinson Lee <vlee@freedesktop.org>
Sun, 21 Jul 2013 07:04:36 +0000 (00:04 -0700)
committerVinson Lee <vlee@freedesktop.org>
Thu, 25 Jul 2013 06:47:34 +0000 (23:47 -0700)
There are earlier returns for PIPE_FUNC_NEVER and PIPE_FUNC_ALWAYS. The
switch value of 'func' cannot be either of those values.

Fixes "Logically dead code" defects reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_logic.c

index 322d385db6ce64d414ab4f9f5d0f4ad8d71ef552..fc7a7289707bba4f4d1c95f2db764be38c09816f 100644 (file)
@@ -100,12 +100,6 @@ lp_build_compare_ext(struct gallivm_state *gallivm,
    if(type.floating) {
       LLVMRealPredicate op;
       switch(func) {
-      case PIPE_FUNC_NEVER:
-         op = LLVMRealPredicateFalse;
-         break;
-      case PIPE_FUNC_ALWAYS:
-         op = LLVMRealPredicateTrue;
-         break;
       case PIPE_FUNC_EQUAL:
          op = ordered ? LLVMRealOEQ : LLVMRealUEQ;
          break;