From d27ce037805e739dfec0d1e84017d62ff9e03409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as?= Date: Tue, 8 Oct 2013 00:56:41 +0200 Subject: [PATCH] Remove warning by open coding WM_ITERATE_ARRAY macro This patch gets rid of the warning: switchpanel.c: In function 'wSwitchPanelSelectFirst': switchpanel.c:673:18: warning: variable 'tmpwin' set but not used [-Wunused-but-set-variable] by using the body of the WM_ITERATE_ARRAY directly and avoiding the temporary variable 'tmpwin' which ends up being used only on the LHS inside the macro. --- src/switchpanel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/switchpanel.c b/src/switchpanel.c index 7fbbfe6c..a0f2195d 100644 --- a/src/switchpanel.c +++ b/src/switchpanel.c @@ -670,7 +670,7 @@ WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int back, int ignore_minimi WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back) { - WWindow *wwin, *tmpwin; + WWindow *wwin; int count = WMGetArrayItemCount(panel->windows); char *title; int i; @@ -690,9 +690,9 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back) title = wwin->frame->title; if (panel->win) { - WM_ITERATE_ARRAY(panel->windows, tmpwin, i) { + for (WMArrayFirst(panel->windows, &(i)); (i) != WANotFound; WMArrayNext(panel->windows, &(i))) changeImage(panel, i, i == panel->current, False, False); - } + drawTitle(panel, panel->current, title); }