From 066d0cdef7479f9b12f2a825949bd4ec2dae8fa9 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Fri, 1 Nov 2013 16:06:50 +0100 Subject: [PATCH] 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 --- 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 46e74996..11f90c7f 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 752bd8fb..55a1d562 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 0aff7fca..4dc8d63f 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; -- 2.11.4.GIT