mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-29 11:35:47 +01:00
WINGs: Marked args as unused for compiler in X Error handlers
When an error occurs in X, the Xlib is using a callback mechanism to execute application code to handle the problem, which means having a fixed argument list for that application 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
702764a7b0
commit
237c386fdc
@@ -95,6 +95,9 @@ char *WMGetDragOperationItemText(WMDragOperationItem * item)
|
|||||||
|
|
||||||
static int handleNoWindowXError(Display * dpy, XErrorEvent * errEvt)
|
static int handleNoWindowXError(Display * dpy, XErrorEvent * errEvt)
|
||||||
{
|
{
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) dpy;
|
||||||
|
|
||||||
if (errEvt->error_code == BadWindow || errEvt->error_code == BadDrawable) {
|
if (errEvt->error_code == BadWindow || errEvt->error_code == BadDrawable) {
|
||||||
_WindowExists = False;
|
_WindowExists = False;
|
||||||
return Success;
|
return Success;
|
||||||
|
|||||||
@@ -102,6 +102,10 @@ static void WMDeleteSelectionCallback(WMView * view, Atom selection, Time timest
|
|||||||
|
|
||||||
static int handleXError(Display * dpy, XErrorEvent * ev)
|
static int handleXError(Display * dpy, XErrorEvent * ev)
|
||||||
{
|
{
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) dpy;
|
||||||
|
(void) ev;
|
||||||
|
|
||||||
gotXError = True;
|
gotXError = True;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user