1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-21 17:25:46 +01: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

@@ -2703,11 +2703,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 allowedOperation)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) self;
return (allowedOperation == WDOperationCopy);
}
@@ -2746,11 +2752,20 @@ static WMDragSourceProcs _DragSourceProcs = {
static WMArray *requiredDataTypes(WMView * self, WMDragOperationType request, WMArray * sourceDataTypes)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) request;
(void) sourceDataTypes;
return ((Text *) self->self)->xdndDestinationTypes;
}
static WMDragOperationType allowedOperation(WMView * self, WMDragOperationType request, WMArray * sourceDataTypes)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) self;
(void) request;
(void) sourceDataTypes;
return WDOperationCopy;
}
@@ -2761,6 +2776,10 @@ static void performDragOperation(WMView * self, WMArray * dropData, WMArray * op
char *colorName;
WMColor *color;
/* Parameter not used, but tell the compiler that it is ok */
(void) operations;
(void) dropLocation;
if (tPtr) {
/* only one required type, implies only one drop data */