[Mesa-dev] [PATCH] i965: fix compilation warnings in blorp

Iago Toral itoral at igalia.com
Fri Aug 19 07:51:06 UTC 2016


Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

On Fri, 2016-08-19 at 10:39 +0300, Tapani Pälli wrote:
> (warning: ‘surftype’ may be used uninitialized ...)
> 
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  src/mesa/drivers/dri/i965/gen6_blorp.c | 2 ++
>  src/mesa/drivers/dri/i965/gen7_blorp.c | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.c
> b/src/mesa/drivers/dri/i965/gen6_blorp.c
> index abdcf17..6476fa6 100644
> --- a/src/mesa/drivers/dri/i965/gen6_blorp.c
> +++ b/src/mesa/drivers/dri/i965/gen6_blorp.c
> @@ -711,6 +711,8 @@ gen6_blorp_emit_depth_stencil_config(struct
> brw_context *brw,
>     case ISL_SURF_DIM_3D:
>        surftype = BRW_SURFACE_3D;
>        break;
> +   default:
> +      unreachable("not reached");
>     }
>  
>     /* 3DSTATE_DEPTH_BUFFER */
> diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c
> b/src/mesa/drivers/dri/i965/gen7_blorp.c
> index d35d6c6..96e2b07 100644
> --- a/src/mesa/drivers/dri/i965/gen7_blorp.c
> +++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
> @@ -497,6 +497,8 @@ gen7_blorp_emit_depth_stencil_config(struct
> brw_context *brw,
>     case ISL_SURF_DIM_3D:
>        surftype = BRW_SURFACE_3D;
>        break;
> +   default:
> +      unreachable("not reached");
>     }
>  
>     /* 3DSTATE_DEPTH_BUFFER */


More information about the mesa-dev mailing list