[Mesa-dev] [PATCH 1/2] i965: miptree: silence coverity warning

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Jul 17 04:58:09 UTC 2017


Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

On Sun, 2017-07-16 at 15:31 +0100, Lionel Landwerlin wrote:
> This probably can't happen, but we're better off with initialized
> variables.
> 
> CID: 1415114
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index e7ebc29b59d..83d3d8204aa 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -990,7 +990,7 @@ miptree_create_for_planar_image(struct
> brw_context *brw,
>                                  __DRIimage *image, GLenum target)
>  {
>     struct intel_image_format *f = image->planar_format;
> -   struct intel_mipmap_tree *planar_mt;
> +   struct intel_mipmap_tree *planar_mt = NULL;
>  
>     for (int i = 0; i < f->nplanes; i++) {
>        const int index = f->planes[i].buffer_index;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170717/b0ab2410/attachment.sig>


More information about the mesa-dev mailing list