mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +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 *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back)
|
||||||
{
|
{
|
||||||
WWindow *wwin, *tmpwin;
|
WWindow *wwin;
|
||||||
int count = WMGetArrayItemCount(panel->windows);
|
int count = WMGetArrayItemCount(panel->windows);
|
||||||
char *title;
|
char *title;
|
||||||
int i;
|
int i;
|
||||||
@@ -690,9 +690,9 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back)
|
|||||||
title = wwin->frame->title;
|
title = wwin->frame->title;
|
||||||
|
|
||||||
if (panel->win) {
|
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);
|
changeImage(panel, i, i == panel->current, False, False);
|
||||||
}
|
|
||||||
drawTitle(panel, panel->current, title);
|
drawTitle(panel, panel->current, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user