From: Christophe CURIS <christophe.cu...@free.fr>

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.cu...@free.fr>
---
 WPrefs.app/Appearance.c |  6 ++++++
 WPrefs.app/Menu.c       | 11 +++++++++++
 WPrefs.app/Paths.c      |  3 +++
 3 files changed, 20 insertions(+)

diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index 46e7499..11f90c7 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -1213,6 +1213,9 @@ static void paintListItem(WMList * lPtr, int index, 
Drawable d, char *text, int
        WMColor *black = WMBlackColor(scr);
        TextureListItem *titem;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) text;
+
        item = WMGetListItem(lPtr, index);
        titem = (TextureListItem *) item->clientData;
        if (!titem) {
@@ -1497,6 +1500,9 @@ static void changedTabItem(struct WMTabViewDelegate 
*self, WMTabView * tabView,
        _Panel *panel = self->data;
        int i;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) tabView;
+
        i = WMGetTabViewItemIdentifier(item);
        switch (i) {
        case 0:
diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index 752bd8f..55a1d56 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1215,6 +1215,10 @@ menuItemCloned(WEditMenuDelegate * delegate, WEditMenu * 
menu, WEditMenuItem * o
        ItemData *data = WGetEditMenuItemData(origItem);
        ItemData *newData;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) delegate;
+       (void) menu;
+
        if (!data)
                return;
 
@@ -1310,6 +1314,10 @@ static void menuItemDeselected(WEditMenuDelegate * 
delegate, WEditMenu * menu, W
 {
        _Panel *panel = (_Panel *) delegate->data;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) menu;
+       (void) item;
+
        changeInfoType(panel, NULL, NoInfo);
 }
 
@@ -1318,6 +1326,9 @@ static void menuItemSelected(WEditMenuDelegate * 
delegate, WEditMenu * menu, WEd
        ItemData *data = WGetEditMenuItemData(item);
        _Panel *panel = (_Panel *) delegate->data;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) menu;
+
        panel->currentItem = item;
 
        if (data) {
diff --git a/WPrefs.app/Paths.c b/WPrefs.app/Paths.c
index 0aff7fc..4dc8d63 100644
--- a/WPrefs.app/Paths.c
+++ b/WPrefs.app/Paths.c
@@ -177,6 +177,9 @@ static void paintItem(WMList * lPtr, int index, Drawable d, 
char *text, int stat
        Display *dpy = WMScreenDisplay(scr);
        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;
        height = rect->size.height;
        x = rect->pos.x;
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to