From: Rodolfo García Peñas <[email protected]>
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 7fbbfe6..a0f2195 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);
}
--
1.8.4.rc3
--
To unsubscribe, send mail to [email protected].