1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-29 09:52:29 +01:00

WINGs: 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-10-19 22:17:51 +02:00
committed by Carlos R. Mafra
parent 58961dce72
commit fed1bf4de3
6 changed files with 27 additions and 0 deletions

View File

@@ -2321,6 +2321,9 @@ static void grayBrightnessTextFieldCallback(void *observerData, WMNotification *
int value;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
value = atoi(WMGetTextFieldText(panel->grayBrightnessT));
if (value > 100)
value = 100;
@@ -2375,6 +2378,9 @@ static void rgbTextFieldCallback(void *observerData, WMNotification * notificati
int n;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
value[0] = atoi(WMGetTextFieldText(panel->rgbRedT));
value[1] = atoi(WMGetTextFieldText(panel->rgbGreenT));
value[2] = atoi(WMGetTextFieldText(panel->rgbBlueT));
@@ -2449,6 +2455,9 @@ static void cmykTextFieldCallback(void *observerData, WMNotification * notificat
double scale;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
value[0] = atoi(WMGetTextFieldText(panel->cmykCyanT));
value[1] = atoi(WMGetTextFieldText(panel->cmykMagentaT));
value[2] = atoi(WMGetTextFieldText(panel->cmykYellowT));
@@ -2534,6 +2543,9 @@ static void hsbTextFieldCallback(void *observerData, WMNotification * notificati
int n;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
value[0] = atoi(WMGetTextFieldText(panel->hsbHueT));
value[1] = atoi(WMGetTextFieldText(panel->hsbSaturationT));
value[2] = atoi(WMGetTextFieldText(panel->hsbBrightnessT));

View File

@@ -92,6 +92,9 @@ static void updateDoubleBufferPixmap(WMList * lPtr)
static void realizeObserver(void *self, WMNotification * not)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) not;
updateDoubleBufferPixmap(self);
}

View File

@@ -49,6 +49,9 @@ static void makeKnobPixmap(Slider * sPtr);
static void realizeObserver(void *self, WMNotification * not)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) not;
makeKnobPixmap(self);
}

View File

@@ -351,6 +351,9 @@ static void handleViewResized(void *self, WMNotification * notification)
{
WMSplitView *sPtr = (WMSplitView *) self;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
#if 0
printf("---- (handleViewResized - 1) ----\n");
dumpSubviews(sPtr);

View File

@@ -307,6 +307,9 @@ static void selectionNotification(void *observerData, WMNotification * notificat
static void realizeObserver(void *self, WMNotification * not)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) not;
W_CreateIC(((TextField *) self)->view);
}

View File

@@ -95,6 +95,9 @@ static void realizeWindow(WMWindow * win);
static void realizeObserver(void *self, WMNotification * not)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) not;
realizeWindow(self);
}