mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
014bc52531
commit
d27ce03780
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user