mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-09 01:45:48 +01:00
WPrefs: 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
dd82c46335
commit
bc5985e824
@@ -72,6 +72,10 @@ static void prepareForClose(void);
|
||||
|
||||
static void quit(WMWidget *w, void *data)
|
||||
{
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
(void) data;
|
||||
|
||||
prepareForClose();
|
||||
|
||||
exit(0);
|
||||
@@ -85,6 +89,9 @@ static void save(WMWidget * w, void *data)
|
||||
WMPropList *key;
|
||||
XEvent ev;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) data;
|
||||
|
||||
/* puts("gathering data"); */
|
||||
for (i = 0; i < WPrefs.sectionCount; i++) {
|
||||
PanelRec *rec = WMGetHangedData(WPrefs.sectionB[i]);
|
||||
@@ -134,6 +141,10 @@ static void undo(WMWidget * w, void *data)
|
||||
{
|
||||
PanelRec *rec = (PanelRec *) WPrefs.currentPanel;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
(void) data;
|
||||
|
||||
if (!rec)
|
||||
return;
|
||||
|
||||
@@ -146,6 +157,10 @@ static void undoAll(WMWidget * w, void *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
(void) data;
|
||||
|
||||
for (i = 0; i < WPrefs.sectionCount; i++) {
|
||||
PanelRec *rec = WMGetHangedData(WPrefs.sectionB[i]);
|
||||
|
||||
@@ -171,6 +186,10 @@ static void toggleBalloons(WMWidget *w, void *data)
|
||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||
Bool flag;
|
||||
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) w;
|
||||
(void) data;
|
||||
|
||||
flag = WMGetButtonSelected(WPrefs.balloonBtn);
|
||||
|
||||
WMSetBalloonEnabled(WMWidgetScreen(WPrefs.win), flag);
|
||||
@@ -317,6 +336,9 @@ static void savePanelData(Panel * panel)
|
||||
|
||||
static void changeSection(WMWidget * self, void *data)
|
||||
{
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) self;
|
||||
|
||||
if (WPrefs.currentPanel == data)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user