util: use C99 declaration in the for-loop hash_table_foreach() macro

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Eric Engestrom
2018-10-20 18:00:08 +01:00
committed by Eric Engestrom
parent 3d261cf77b
commit bb84fa146f
36 changed files with 5 additions and 72 deletions

View File

@@ -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;

View File

@@ -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 =

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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();