[Mesa-dev] [PATCH] nir: silence compiler warning from visit_src() call

Connor Abbott cwabbott0 at gmail.com
Thu Jan 15 14:49:41 PST 2015


On Thu, Jan 15, 2015 at 5:28 PM, Brian Paul <brianp at vmware.com> wrote:
> Warning seen with gcc 4.8.2
> ---
>  src/glsl/nir/nir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
> index f112db8..6d6f910 100644
> --- a/src/glsl/nir/nir.c
> +++ b/src/glsl/nir/nir.c
> @@ -1541,7 +1541,7 @@ static bool
>  visit_tex_src(nir_tex_instr *instr, nir_foreach_src_cb cb, void *state)
>  {
>     for (unsigned i = 0; i < instr->num_srcs; i++)
> -      if (!visit_src(&instr->src[i], cb, state))
> +      if (!visit_src((nir_src *) &instr->src[i], cb, state))

This should be visit_src(&instr->src[i].src, ...) -- we changed the
type of texture sources in 4aa6162f6ecf96c7400c17c310eba0cfd0f5e083,
but it seems like we forgot to update this.

>           return false;
>
>     if (instr->sampler != NULL)
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list