mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-29 19:55:49 +01:00
WPrefs: Marked args as unused for compiler in WINGs callback code
The WINGs toolkit dispatch events on widgets using callbacks, which means having a fixed argument list for the handling function. It is then correct to not use all the arguments, so this patch adds the appropriate stuff to avoid a false report from compiler. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
63037bf426
commit
066d0cdef7
@@ -1213,6 +1213,9 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
|
|||||||
WMColor *black = WMBlackColor(scr);
|
WMColor *black = WMBlackColor(scr);
|
||||||
TextureListItem *titem;
|
TextureListItem *titem;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) text;
|
||||||
|
|
||||||
item = WMGetListItem(lPtr, index);
|
item = WMGetListItem(lPtr, index);
|
||||||
titem = (TextureListItem *) item->clientData;
|
titem = (TextureListItem *) item->clientData;
|
||||||
if (!titem) {
|
if (!titem) {
|
||||||
@@ -1497,6 +1500,9 @@ static void changedTabItem(struct WMTabViewDelegate *self, WMTabView * tabView,
|
|||||||
_Panel *panel = self->data;
|
_Panel *panel = self->data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) tabView;
|
||||||
|
|
||||||
i = WMGetTabViewItemIdentifier(item);
|
i = WMGetTabViewItemIdentifier(item);
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
@@ -1215,6 +1215,10 @@ menuItemCloned(WEditMenuDelegate * delegate, WEditMenu * menu, WEditMenuItem * o
|
|||||||
ItemData *data = WGetEditMenuItemData(origItem);
|
ItemData *data = WGetEditMenuItemData(origItem);
|
||||||
ItemData *newData;
|
ItemData *newData;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) delegate;
|
||||||
|
(void) menu;
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1310,6 +1314,10 @@ static void menuItemDeselected(WEditMenuDelegate * delegate, WEditMenu * menu, W
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) delegate->data;
|
_Panel *panel = (_Panel *) delegate->data;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) menu;
|
||||||
|
(void) item;
|
||||||
|
|
||||||
changeInfoType(panel, NULL, NoInfo);
|
changeInfoType(panel, NULL, NoInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1318,6 +1326,9 @@ static void menuItemSelected(WEditMenuDelegate * delegate, WEditMenu * menu, WEd
|
|||||||
ItemData *data = WGetEditMenuItemData(item);
|
ItemData *data = WGetEditMenuItemData(item);
|
||||||
_Panel *panel = (_Panel *) delegate->data;
|
_Panel *panel = (_Panel *) delegate->data;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) menu;
|
||||||
|
|
||||||
panel->currentItem = item;
|
panel->currentItem = item;
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|||||||
@@ -177,6 +177,9 @@ static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int stat
|
|||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
WMColor *backColor = (state & WLDSSelected) ? panel->white : panel->gray;
|
WMColor *backColor = (state & WLDSSelected) ? panel->white : panel->gray;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) index;
|
||||||
|
|
||||||
width = rect->size.width;
|
width = rect->size.width;
|
||||||
height = rect->size.height;
|
height = rect->size.height;
|
||||||
x = rect->pos.x;
|
x = rect->pos.x;
|
||||||
|
|||||||
Reference in New Issue
Block a user