summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-10-20 18:00:08 +0100
committerEric Engestrom <[email protected]>2018-10-25 12:43:18 +0100
commitbb84fa146f2252f22999205a2904d8a948bffd3b (patch)
tree2e4773252d67da46590ec4a545fc10f6125043a9 /src/compiler/glsl
parent3d261cf77b35c56cc575ce9bb7909d2f8d920233 (diff)
util: use C99 declaration in the for-loop hash_table_foreach() macro
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp1
-rw-r--r--src/compiler/glsl/link_uniform_blocks.cpp2
-rw-r--r--src/compiler/glsl/opt_constant_propagation.cpp2
-rw-r--r--src/compiler/glsl/opt_constant_variable.cpp1
-rw-r--r--src/compiler/glsl/opt_dead_code.cpp1
-rw-r--r--src/compiler/glsl/tests/array_refcount_test.cpp1
6 files changed, 0 insertions, 8 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 97329e5be24..084b7021a9f 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -6645,7 +6645,6 @@ ast_case_statement_list::hir(exec_list *instructions,
* if default should be chosen or not.
*/
if (!default_case.is_empty()) {
- struct hash_entry *entry;
ir_factory body(instructions, state);
ir_expression *cmp = NULL;
diff --git a/src/compiler/glsl/link_uniform_blocks.cpp b/src/compiler/glsl/link_uniform_blocks.cpp
index 0ab9687b7fb..0b890586298 100644
--- a/src/compiler/glsl/link_uniform_blocks.cpp
+++ b/src/compiler/glsl/link_uniform_blocks.cpp
@@ -362,7 +362,6 @@ create_buffer_blocks(void *mem_ctx, struct gl_context *ctx,
ctx->Const.UseSTD430AsDefaultPacking);
unsigned i = 0;
- struct hash_entry *entry;
hash_table_foreach (block_hash, entry) {
const struct link_uniform_block_active *const b =
(const struct link_uniform_block_active *) entry->data;
@@ -429,7 +428,6 @@ link_uniform_blocks(void *mem_ctx,
unsigned num_ubo_variables = 0;
unsigned num_ssbo_variables = 0;
count_block_size block_size;
- struct hash_entry *entry;
hash_table_foreach (block_hash, entry) {
struct link_uniform_block_active *const b =
diff --git a/src/compiler/glsl/opt_constant_propagation.cpp b/src/compiler/glsl/opt_constant_propagation.cpp
index a603c9fbbf9..642bd641ed6 100644
--- a/src/compiler/glsl/opt_constant_propagation.cpp
+++ b/src/compiler/glsl/opt_constant_propagation.cpp
@@ -380,7 +380,6 @@ ir_constant_propagation_visitor::visit_enter(ir_if *ir)
acp->make_empty();
killed_all = true;
} else {
- hash_entry *htk;
hash_table_foreach(new_kills, htk)
kill((ir_variable *) htk->key, (uintptr_t) htk->data);
}
@@ -420,7 +419,6 @@ ir_constant_propagation_visitor::handle_loop(ir_loop *ir, bool keep_acp)
this->acp = orig_acp;
this->killed_all = this->killed_all || orig_killed_all;
- hash_entry *htk;
hash_table_foreach(new_kills, htk) {
kill((ir_variable *) htk->key, (uintptr_t) htk->data);
}
diff --git a/src/compiler/glsl/opt_constant_variable.cpp b/src/compiler/glsl/opt_constant_variable.cpp
index 914b46004c1..15d8cf7cdfd 100644
--- a/src/compiler/glsl/opt_constant_variable.cpp
+++ b/src/compiler/glsl/opt_constant_variable.cpp
@@ -190,7 +190,6 @@ do_constant_variable(exec_list *instructions)
_mesa_key_pointer_equal);
v.run(instructions);
- struct hash_entry *hte;
hash_table_foreach(v.ht, hte) {
struct assignment_entry *entry = (struct assignment_entry *) hte->data;
diff --git a/src/compiler/glsl/opt_dead_code.cpp b/src/compiler/glsl/opt_dead_code.cpp
index 75e668ae46d..1eff3f2fd14 100644
--- a/src/compiler/glsl/opt_dead_code.cpp
+++ b/src/compiler/glsl/opt_dead_code.cpp
@@ -50,7 +50,6 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned)
v.run(instructions);
- struct hash_entry *e;
hash_table_foreach(v.ht, e) {
ir_variable_refcount_entry *entry = (ir_variable_refcount_entry *)e->data;
diff --git a/src/compiler/glsl/tests/array_refcount_test.cpp b/src/compiler/glsl/tests/array_refcount_test.cpp
index 0d8f4521cae..45c204dc2f8 100644
--- a/src/compiler/glsl/tests/array_refcount_test.cpp
+++ b/src/compiler/glsl/tests/array_refcount_test.cpp
@@ -160,7 +160,6 @@ validate_variables_in_hash_table(struct hash_table *ht,
va_end(args);
- struct hash_entry *entry;
hash_table_foreach(ht, entry) {
const ir_instruction *const ir = (ir_instruction *) entry->key;
const ir_variable *const v = ir->as_variable();