mirror of
https://github.com/gryf/wmaker.git
synced 2026-04-21 16:01:26 +02:00
WINGs: Marked args as unused for compiler in event 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
237c386fdc
commit
ea74fe8871
@@ -1129,6 +1129,9 @@ static void closeWindowCallback(WMWidget * w, void *data)
|
||||
{
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
WMCloseColorPanel(panel);
|
||||
}
|
||||
|
||||
@@ -1680,6 +1683,9 @@ static void magnifyPutCursor(WMWidget * w, void *data)
|
||||
XEvent event;
|
||||
WMPoint initialPosition;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
/* Destroy wheelBackImg, so it'll update properly */
|
||||
if (panel->selectionBackImg) {
|
||||
XFreePixmap(WMWidgetScreen(panel->win)->display, panel->selectionBackImg);
|
||||
@@ -2130,6 +2136,9 @@ static void wheelBrightnessSliderCallback(WMWidget * w, void *data)
|
||||
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
value = 255 - WMGetSliderValue(panel->wheelBrightnessS);
|
||||
|
||||
wheelCalculateValues(panel, value);
|
||||
@@ -2275,6 +2284,9 @@ static void grayBrightnessSliderCallback(WMWidget * w, void *data)
|
||||
char tmp[4];
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
value = WMGetSliderValue(panel->grayBrightnessS);
|
||||
|
||||
sprintf(tmp, "%d", value);
|
||||
@@ -2350,6 +2362,9 @@ static void rgbSliderCallback(WMWidget * w, void *data)
|
||||
char tmp[4];
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
value[0] = WMGetSliderValue(panel->rgbRedS);
|
||||
value[1] = WMGetSliderValue(panel->rgbGreenS);
|
||||
value[2] = WMGetSliderValue(panel->rgbBlueS);
|
||||
@@ -2422,6 +2437,9 @@ static void cmykSliderCallback(WMWidget * w, void *data)
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
double scale;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
value[0] = WMGetSliderValue(panel->cmykCyanS);
|
||||
value[1] = WMGetSliderValue(panel->cmykMagentaS);
|
||||
value[2] = WMGetSliderValue(panel->cmykYellowS);
|
||||
@@ -2862,6 +2880,9 @@ static void customPaletteMenuCallback(WMWidget * w, void *data)
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
int item = WMGetPopUpButtonSelectedItem(panel->customPaletteMenuBtn);
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
switch (item) {
|
||||
case CPmenuNewFromFile:
|
||||
customPaletteMenuNewFromFile(panel);
|
||||
@@ -3200,6 +3221,9 @@ static void colorListColorMenuCallback(WMWidget * w, void *data)
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
int item = WMGetPopUpButtonSelectedItem(panel->colorListColorMenuBtn);
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
switch (item) {
|
||||
case CLmenuAdd:
|
||||
break;
|
||||
@@ -3215,6 +3239,9 @@ static void colorListListMenuCallback(WMWidget * w, void *data)
|
||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||
int item = WMGetPopUpButtonSelectedItem(panel->colorListListMenuBtn);
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
|
||||
switch (item) {
|
||||
case CLmenuAdd:
|
||||
/* New Color List */
|
||||
|
||||
Reference in New Issue
Block a user