mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
wmaker: 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
f0b8be0aed
commit
298343f5ad
@@ -109,6 +109,10 @@ static void make_keys(void)
|
|||||||
*/
|
*/
|
||||||
static int alreadyRunningError(Display * dpy, XErrorEvent * error)
|
static int alreadyRunningError(Display * dpy, XErrorEvent * error)
|
||||||
{
|
{
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) dpy;
|
||||||
|
(void) error;
|
||||||
|
|
||||||
CantManageScreen = 1;
|
CantManageScreen = 1;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -520,7 +524,7 @@ WScreen *wScreenInit(int screen_number)
|
|||||||
scr->fakeGroupLeaders = WMCreateArray(16);
|
scr->fakeGroupLeaders = WMCreateArray(16);
|
||||||
|
|
||||||
CantManageScreen = 0;
|
CantManageScreen = 0;
|
||||||
oldHandler = XSetErrorHandler((XErrorHandler) alreadyRunningError);
|
oldHandler = XSetErrorHandler(alreadyRunningError);
|
||||||
|
|
||||||
event_mask = EVENT_MASK;
|
event_mask = EVENT_MASK;
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,9 @@ static int catchXError(Display * dpy, XErrorEvent * error)
|
|||||||
*/
|
*/
|
||||||
static int handleXIO(Display * xio_dpy)
|
static int handleXIO(Display * xio_dpy)
|
||||||
{
|
{
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) xio_dpy;
|
||||||
|
|
||||||
dpy = NULL;
|
dpy = NULL;
|
||||||
Exit(0);
|
Exit(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -110,6 +110,10 @@ WTexSolid *wTextureMakeSolid(WScreen * scr, XColor * color)
|
|||||||
|
|
||||||
static int dummyErrorHandler(Display * foo, XErrorEvent * bar)
|
static int dummyErrorHandler(Display * foo, XErrorEvent * bar)
|
||||||
{
|
{
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) foo;
|
||||||
|
(void) bar;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user