summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrii Simiklit <[email protected]>2018-11-13 14:19:29 +0200
committerEric Engestrom <[email protected]>2018-11-14 13:35:38 +0000
commit7aca650122dc6ad40c6b741562564232d21a0d76 (patch)
tree48f3d9eeb823ec8d9c347a68758f4caf9cbc6801 /src
parent69ee49ac4678a60e2ae762b9f7752e61d27347c6 (diff)
compiler: avoid 'unused variable' warnings
1. nir/nir_lower_vars_to_ssa.c:691:21: warning: unused variable ‘var’ nir_variable *var = path->path[0]->var; v2: Changes for some part of 'may be used uninitialized' warnings were removed, seems like it is a compiler issue. ( Eric Engestrom <[email protected]> ) Possible like this one: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46684 This issue is flagged as duplicate but an original one is not closed yet. Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_vars_to_ssa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c
index 8e517a78957..646efd9ad89 100644
--- a/src/compiler/nir/nir_lower_vars_to_ssa.c
+++ b/src/compiler/nir/nir_lower_vars_to_ssa.c
@@ -683,10 +683,9 @@ nir_lower_vars_to_ssa_impl(nir_function_impl *impl)
nir_deref_path *path = &node->path;
assert(path->path[0]->deref_type == nir_deref_type_var);
- nir_variable *var = path->path[0]->var;
/* We don't build deref nodes for non-local variables */
- assert(var->data.mode == nir_var_local);
+ assert(path->path[0]->var->data.mode == nir_var_local);
if (path_may_be_aliased(path, &state)) {
exec_node_remove(&node->direct_derefs_link);