1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-04-04 22:33:35 +02:00

WINGs: Marked args as unused for compiler in XDND callback code

The drag-n-drop mechanism is managed by WINGs through 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:52 +02:00
committed by Carlos R. Mafra
parent fed1bf4de3
commit 0d8a530bc3
4 changed files with 96 additions and 0 deletions

View File

@@ -279,11 +279,17 @@ static WMArray *dropDataTypes(WMView * self)
static WMDragOperationType wantedDropOperation(WMView * self)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) self;
return WDOperationCopy;
}
static Bool acceptDropOperation(WMView * self, WMDragOperationType operation)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) self;
return (operation == WDOperationCopy);
}
@@ -292,6 +298,9 @@ static WMData *fetchDragData(WMView * self, char *type)
char *color = WMGetColorRGBDescription(((WMColorWell *) self->self)->color);
WMData *data;
/* Parameter not used, but tell the compiler that it is ok */
(void) type;
data = WMCreateDataWithBytes(color, strlen(color) + 1);
wfree(color);
@@ -388,6 +397,9 @@ static WMArray *requiredDataTypes(WMView * self, WMDragOperationType request, WM
static WMDragOperationType allowedOperation(WMView * self, WMDragOperationType request, WMArray * sourceDataTypes)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) self;
if (dropIsOk(request, sourceDataTypes))
return WDOperationCopy;
else
@@ -400,6 +412,10 @@ static void performDragOperation(WMView * self, WMArray * dropData, WMArray * op
WMColor *color;
WMData *data;
/* Parameter not used, but tell the compiler that it is ok */
(void) operations;
(void) dropLocation;
/* only one operation requested (WDOperationCopy) implies only one data */
data = (WMData *) WMGetFromArray(dropData, 0);