[Mesa-dev] [PATCH] nir: remove unused variable

Timothy Arceri tarceri at itsqueeze.com
Thu Dec 13 23:32:58 UTC 2018


I don't think I've seen the warning so its likely I use this (or 
removing it) in a future patch. But feel free to push this for now.

On 14/12/18 1:25 am, Alejandro Piñeiro wrote:
> To avoid the following warning:
> ./src/compiler/nir/nir_loop_analyze.c:807:16: warning: unused variable ‘ns’ [-Wunused-variable]
>      nir_shader *ns = impl->function->shader;
> ---
> 
> Perhaps this is solved on any of the loop analysis patches pending to
> be reviewed, but just in case, sending it.
> 
>   src/compiler/nir/nir_loop_analyze.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c
> index 3de45401975..259f02a854e 100644
> --- a/src/compiler/nir/nir_loop_analyze.c
> +++ b/src/compiler/nir/nir_loop_analyze.c
> @@ -803,7 +803,6 @@ get_loop_info(loop_info_state *state, nir_function_impl *impl)
>      /* Run through each of the terminators and try to compute a trip-count */
>      find_trip_count(state);
>   
> -   nir_shader *ns = impl->function->shader;
>      nir_foreach_block_in_cf_node(block, &state->loop->cf_node) {
>         if (force_unroll_heuristics(state, block)) {
>            state->loop->info->force_unroll = true;
> 


More information about the mesa-dev mailing list