llvmpipe: Silence Coverity incorrect sizeof expression defect.
authorVinson Lee <vlee@freedesktop.org>
Sun, 12 Aug 2012 07:20:21 +0000 (00:20 -0700)
committerVinson Lee <vlee@freedesktop.org>
Thu, 16 Aug 2012 05:15:49 +0000 (22:15 -0700)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_state_setup.c

index 1d5e50be9b7108f7c16e0e3fbfc8d3a0cd849734..469a4595556fd99a03c27c865b6e1ca12c804f78 100644 (file)
@@ -585,7 +585,7 @@ set_noalias(LLVMBuilderRef builder,
            int nr_args)
 {
    int i;
-   for(i = 0; i < Elements(arg_types); ++i)
+   for(i = 0; i < nr_args; ++i)
       if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
          LLVMAddAttribute(LLVMGetParam(function, i),
                          LLVMNoAliasAttribute);