[Mesa-dev] [PATCH] i965: Mark branch unreachable in sampler state code.

Kenneth Graunke kenneth at whitecape.org
Sun Aug 10 21:46:24 PDT 2014


On Sunday, August 10, 2014 09:38:04 PM Matt Turner wrote:
> Silences some uninitialized variable warnings.
> ---
>  src/mesa/drivers/dri/i965/brw_sampler_state.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c b/src/mesa/drivers/dri/i965/brw_sampler_state.c
> index d03047b..544aa57 100644
> --- a/src/mesa/drivers/dri/i965/brw_sampler_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c
> @@ -352,7 +352,7 @@ brw_update_sampler_state(struct brw_context *brw,
>        mip_filter = BRW_MIPFILTER_LINEAR;
>        break;
>     default:
> -      break;
> +      unreachable("not reached");
>     }
>  
>     /* Select mag filter. */
> 

Yep, and set_tex_parameteri in texparam.c guarantees this.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140810/3a0aa0a3/attachment.sig>


More information about the mesa-dev mailing list