From 85f2a20e7535a5f8dcdeb805f3e30f387d45baf3 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 8 Jun 2019 19:20:26 -0700 Subject: Fix -Wshadow warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit viewres.c: In function ‘select_callback’: viewres.c:620:18: warning: declaration of ‘node’ shadows a previous local [-Wshadow] XmuWidgetNode *node = selected_list.elements[i]; ^~~~ viewres.c:593:20: note: shadowed declaration is here XmuWidgetNode *node; ^~~~ viewres.c:658:18: warning: declaration of ‘node’ shadows a previous local [-Wshadow] XmuWidgetNode *node = selected_list.elements[i]; ^~~~ viewres.c:593:20: note: shadowed declaration is here XmuWidgetNode *node; ^~~~ Signed-off-by: Alan Coopersmith --- viewres.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/viewres.c b/viewres.c index 74e402e..8200f81 100644 --- a/viewres.c +++ b/viewres.c @@ -617,9 +617,9 @@ select_callback ( add_to_selected_list (node->superclass, TRUE); } else { for (i = 0; i < nselected; i++) { - XmuWidgetNode *node = selected_list.elements[i]; - if (node->superclass) - add_to_selected_list (node->superclass, TRUE); + XmuWidgetNode *nodeI = selected_list.elements[i]; + if (nodeI->superclass) + add_to_selected_list (nodeI->superclass, TRUE); } } break; @@ -655,11 +655,11 @@ select_callback ( } } else { for (i = 0; i < nselected; i++) { - XmuWidgetNode *node = selected_list.elements[i]; + XmuWidgetNode *nodeI = selected_list.elements[i]; - add_to_selected_list (node, TRUE); - for (node = node->children; node; node = node->siblings) { - add_to_selected_list (node, TRUE); + add_to_selected_list (nodeI, TRUE); + for (nodeI = nodeI->children; nodeI; nodeI = nodeI->siblings) { + add_to_selected_list (nodeI, TRUE); } } } -- cgit v1.2.3