[Mesa-dev] [PATCH] svga: Remove svga_hwtnl_simple_draw_range_elements dead code.
Brian Paul
brianp at vmware.com
Sat Oct 26 15:56:12 CEST 2013
On 10/26/2013 02:12 AM, Vinson Lee wrote:
> Remove dead code left behind by commit
> 8d7b913e4e089cc8b0b800cbcf80737d0be0a0f7.
>
> Fixes "Logically dead code" defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> src/gallium/drivers/svga/svga_draw_elements.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
> index c52ca2d..f9ba66f 100644
> --- a/src/gallium/drivers/svga/svga_draw_elements.c
> +++ b/src/gallium/drivers/svga/svga_draw_elements.c
> @@ -105,7 +105,6 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
> unsigned start,
> unsigned count )
> {
> - struct pipe_resource *upload_buffer = NULL;
> SVGA3dPrimitiveRange range;
> unsigned hw_prim;
> unsigned hw_count;
> @@ -130,13 +129,8 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
> range.indexBias = index_bias;
>
> ret = svga_hwtnl_prim( hwtnl, &range, min_index, max_index, index_buffer );
> - if (ret != PIPE_OK)
> - goto done;
>
> done:
> - if (upload_buffer)
> - pipe_resource_reference( &upload_buffer, NULL );
> -
> return ret;
> }
I think we can do a little better and remove the goto and done label
while we're at it. I'll whip up another patch.
-Brian
More information about the mesa-dev
mailing list