diff options
author | Kai Wasserbäch <[email protected]> | 2018-08-17 16:32:32 +0200 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-08-18 10:34:15 +1000 |
commit | 6f0647c0b207cfe0805eb899c2d97703ae00b1e7 (patch) | |
tree | 8991bb51bc9b86fd68ec45a1f29fcedb6aa8ecbf /src/compiler/nir | |
parent | 9387ca29ae465f5e1ee3b4a73c1f7725304bb30e (diff) |
nir: mark *prev_block as MAYBE_UNUSED in opt_peel_loop_initial_if
Only used, when asserts are enabled.
Fixes an unused-variable warning with gcc-8:
../../../src/compiler/nir/nir_opt_if.c: In function 'opt_peel_loop_initial_if':
../../../src/compiler/nir/nir_opt_if.c:109:15: warning: unused variable 'prev_block' [-Wunused-variable]
nir_block *prev_block =
^~~~~~~~~~
Signed-off-by: Kai Wasserbäch <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_opt_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c index b3d0bf1decb..dacf2d6c667 100644 --- a/src/compiler/nir/nir_opt_if.c +++ b/src/compiler/nir/nir_opt_if.c @@ -106,7 +106,7 @@ static bool opt_peel_loop_initial_if(nir_loop *loop) { nir_block *header_block = nir_loop_first_block(loop); - nir_block *prev_block = + MAYBE_UNUSED nir_block *prev_block = nir_cf_node_as_block(nir_cf_node_prev(&loop->cf_node)); /* It would be insane if this were not true */ |