1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

WPrefs: Marked args as unused for compiler in Notification callback code

The mechanism of Notifications in the WINGs toolkit is relying on
callbacks to dispatch notifications, 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:
Christophe CURIS
2013-11-01 16:06:46 +01:00
committed by Carlos R. Mafra
parent cd78f11abc
commit 66f6817966
6 changed files with 18 additions and 0 deletions

View File

@@ -1465,6 +1465,9 @@ static void colorWellObserver(void *self, WMNotification * n)
_Panel *panel = (_Panel *) self; _Panel *panel = (_Panel *) self;
int p; int p;
/* Parameter not used, but tell the compiler that it is ok */
(void) n;
p = WMGetPopUpButtonSelectedItem(panel->colP); p = WMGetPopUpButtonSelectedItem(panel->colP);
WMReleaseColor(panel->colors[p]); WMReleaseColor(panel->colors[p]);

View File

@@ -167,6 +167,9 @@ static void raiseTextChanged(void *observerData, WMNotification * notification)
_Panel *panel = (_Panel *) observerData; _Panel *panel = (_Panel *) observerData;
int i; int i;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
if (panel->raiseDelaySelected) { if (panel->raiseDelaySelected) {
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
WMSetButtonSelected(panel->raisB[i], False); WMSetButtonSelected(panel->raisB[i], False);

View File

@@ -393,6 +393,9 @@ static void typedKeys(void *observerData, WMNotification * notification)
_Panel *panel = (_Panel *) observerData; _Panel *panel = (_Panel *) observerData;
int row = WMGetListSelectedItemRow(panel->actLs); int row = WMGetListSelectedItemRow(panel->actLs);
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
if (row < 0) if (row < 0)
return; return;

View File

@@ -151,6 +151,9 @@ static void returnPressed(void *observerData, WMNotification * notification)
{ {
_Panel *panel = (_Panel *) observerData; _Panel *panel = (_Panel *) observerData;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
speedChange(NULL, panel); speedChange(NULL, panel);
} }

View File

@@ -524,6 +524,9 @@ static void gradDeleteCallback(WMWidget * w, void *data)
static void colorWellObserver(void *self, WMNotification * n) static void colorWellObserver(void *self, WMNotification * n)
{ {
/* Parameter not used, but tell the compiler that it is ok */
(void) n;
updateSGradButtons(self); updateSGradButtons(self);
} }

View File

@@ -334,6 +334,9 @@ static void realizeObserver(void *self, WMNotification * not)
WEditMenu *menu = (WEditMenu *) self; WEditMenu *menu = (WEditMenu *) self;
GNUstepWMAttributes attribs; GNUstepWMAttributes attribs;
/* Parameter not used, but tell the compiler that it is ok */
(void) not;
memset(&attribs, 0, sizeof(GNUstepWMAttributes)); memset(&attribs, 0, sizeof(GNUstepWMAttributes));
attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr; attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr;
attribs.window_style = WMBorderlessWindowMask; attribs.window_style = WMBorderlessWindowMask;