From: Matt Turner Date: Tue, 15 Jul 2014 19:13:22 +0000 (-0700) Subject: glsl: Don't declare variables in for-loop declaration. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c11096c7497d12b54ace8709e696fcb823de9444;p=mesa.git glsl: Don't declare variables in for-loop declaration. Reported-by: Brian Paul Reviewed-by: Brian Paul --- diff --git a/src/glsl/list.h b/src/glsl/list.h index 3cc48cef644..3ee6cdaa9a9 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -411,9 +411,9 @@ static inline unsigned exec_list_length(const struct exec_list *list) { unsigned size = 0; + struct exec_node *node; - for (struct exec_node *node = list->head; node->next != NULL; - node = node->next) { + for (node = list->head; node->next != NULL; node = node->next) { size++; }