1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-04-21 07:51:25 +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:
Christophe CURIS
2013-10-19 22:17:55 +02:00
committed by Carlos R. Mafra
parent 237c386fdc
commit ea74fe8871
5 changed files with 75 additions and 0 deletions
+19
View File
@@ -551,6 +551,10 @@ static void fillColumn(WMBrowserDelegate * self, WMBrowser * bPtr, int column, W
char *path;
WMFilePanel *panel;
/* Parameter not used, but tell the compiler that it is ok */
(void) self;
(void) list;
if (column > 0) {
path = WMGetBrowserPathToColumn(bPtr, column - 1);
} else {
@@ -566,6 +570,9 @@ static void browserDClick(WMWidget *widget, void *p_panel)
{
WMFilePanel *panel = p_panel;
/* Parameter not used, but tell the compiler that it is ok */
(void) widget;
WMPerformButtonClick(panel->okButton);
}
@@ -604,6 +611,9 @@ static void createDir(WMWidget *widget, void *p_panel)
size_t slen;
WMScreen *scr = WMWidgetScreen(panel->win);
/* Parameter not used, but tell the compiler that it is ok */
(void) widget;
dirName = WMRunInputPanel(scr, panel->win, _("Create Directory"),
_("Enter directory name"), "", _("OK"), _("Cancel"));
if (!dirName)
@@ -688,6 +698,9 @@ static void deleteFile(WMWidget *widget, void *p_panel)
WMScreen *scr = WMWidgetScreen(panel->win);
#define __msgbufsize__ 512
/* Parameter not used, but tell the compiler that it is ok */
(void) widget;
buffer = wmalloc(__msgbufsize__);
file = getCurrentFileName(panel);
normalizePath(file);
@@ -733,6 +746,9 @@ static void goFloppy(WMWidget *widget, void *p_panel)
struct stat filestat;
WMScreen *scr = WMWidgetScreen(panel->win);
/* Parameter not used, but tell the compiler that it is ok */
(void) widget;
if (stat(WINGsConfiguration.floppyPath, &filestat)) {
showError(scr, panel->win, _("An error occured browsing '%s'."), WINGsConfiguration.floppyPath);
return;
@@ -749,6 +765,9 @@ static void goHome(WMWidget *widget, void *p_panel)
WMFilePanel *panel = p_panel;
char *home;
/* Parameter not used, but tell the compiler that it is ok */
(void) widget;
/* home is statically allocated. Don't free it! */
home = wgethomedir();
if (!home)