diff --git a/WINGs/dragdestination.c b/WINGs/dragdestination.c index 17bbd8a7..3c828e8c 100644 --- a/WINGs/dragdestination.c +++ b/WINGs/dragdestination.c @@ -407,6 +407,12 @@ storeDropData(WMView * destView, Atom selection, Atom target, Time timestamp, vo WMDraggingInfo *info = &(scr->dragInfo); WMData *dataToStore = NULL; + /* Parameter not used, but tell the compiler that it is ok */ + (void) selection; + (void) target; + (void) timestamp; + (void) cdata; + if (data != NULL) dataToStore = WMRetainData(data); @@ -888,6 +894,11 @@ void WMUnregisterViewDraggedTypes(WMView * view) static WMDragOperationType defAllowedOperation(WMView * self, WMDragOperationType requestedOperation, WMArray * sourceDataTypes) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + (void) requestedOperation; + (void) sourceDataTypes; + /* no operation allowed */ return WDOperationNone; } @@ -903,6 +914,11 @@ defAllowedOperation(WMView * self, WMDragOperationType requestedOperation, WMArr static WMArray *defRequiredDataTypes(WMView * self, WMDragOperationType requestedOperation, WMArray * sourceDataTypes) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + (void) requestedOperation; + (void) sourceDataTypes; + /* no data type allowed (NULL even at 2nd pass) */ return NULL; } @@ -912,6 +928,8 @@ static WMArray *defRequiredDataTypes(WMView * self, */ static void defPrepareForDragOperation(WMView * self) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; } /* @@ -938,11 +956,18 @@ static void defPrepareForDragOperation(WMView * self) static void defPerformDragOperation(WMView * self, WMArray * dropDatas, WMArray * operationList, WMPoint * dropLocation) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + (void) dropDatas; + (void) operationList; + (void) dropLocation; } /* Executed after drop */ static void defConcludeDragOperation(WMView * self) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; } void WMSetViewDragDestinationProcs(WMView * view, WMDragDestinationProcs * procs) diff --git a/WINGs/dragsource.c b/WINGs/dragsource.c index 4b134b08..05d2c6a5 100644 --- a/WINGs/dragsource.c +++ b/WINGs/dragsource.c @@ -132,6 +132,10 @@ static WMData *convertSelection(WMView * view, Atom selection, Atom target, void WMData *data; char *typeName; + /* Parameter not used, but tell the compiler that it is ok */ + (void) selection; + (void) cdata; + scr = W_VIEW_SCREEN(view); typeName = XGetAtomName(scr->display, target); @@ -151,11 +155,22 @@ static WMData *convertSelection(WMView * view, Atom selection, Atom target, void static void selectionLost(WMView * view, Atom selection, void *cdata) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) view; + (void) selection; + (void) cdata; + wwarning("DND selection lost during drag operation..."); } static void selectionDone(WMView * view, Atom selection, Atom target, void *cdata) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) view; + (void) selection; + (void) target; + (void) cdata; + #ifdef XDND_DEBUG printf("selection done\n"); #endif @@ -542,11 +557,17 @@ static void initSourceDragInfo(WMView * sourceView, WMDraggingInfo * info) */ static WMArray *defDropDataTypes(WMView * self) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + return NULL; } static WMDragOperationType defWantedDropOperation(WMView * self) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + return WDOperationNone; } @@ -560,15 +581,26 @@ static WMDragOperationType defWantedDropOperation(WMView * self) static Bool defAcceptDropOperation(WMView * self, WMDragOperationType allowedOperation) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + (void) allowedOperation; + return False; } static void defBeganDrag(WMView * self, WMPoint * point) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + (void) point; } static void defEndedDrag(WMView * self, WMPoint * point, Bool deposited) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + (void) point; + (void) deposited; } /* @@ -576,6 +608,10 @@ static void defEndedDrag(WMView * self, WMPoint * point, Bool deposited) */ static WMData *defFetchDragData(WMView * self, char *type) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) self; + (void) type; + return NULL; } diff --git a/WINGs/wcolorwell.c b/WINGs/wcolorwell.c index 17934856..7c4bf050 100644 --- a/WINGs/wcolorwell.c +++ b/WINGs/wcolorwell.c @@ -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); diff --git a/WINGs/wtext.c b/WINGs/wtext.c index cadc1512..362cfc3e 100644 --- a/WINGs/wtext.c +++ b/WINGs/wtext.c @@ -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 */