[Mesa-dev] [PATCH] gallivm: Remove dead code in lp_build_compare_ext.

Jose Fonseca jfonseca at vmware.com
Mon Jul 22 05:13:21 PDT 2013


Looks OK to me.

Jose

----- Original Message -----
> 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 at freedesktop.org>
> ---
>  src/gallium/auxiliary/gallivm/lp_bld_logic.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c
> b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
> index 322d385..fc7a728 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
> @@ -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;
> --
> 1.8.2.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list