Avoid cast.

SVN revision: 46335
This commit is contained in:
Kim Woelders 2010-02-20 11:51:07 +00:00
parent 08183bec3f
commit d67ea1d096
1 changed files with 4 additions and 4 deletions

View File

@ -24,11 +24,11 @@ static int list_max_count = 0;
static char _x_err = 0;
/* the fucntion we use for catching the error */
static void
static int
TmpXError(Display * d, XErrorEvent * ev)
{
_x_err = 1;
return;
return 0;
d = NULL;
ev = NULL;
}
@ -74,7 +74,7 @@ __imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw, int depth,
/* setup a temporary error handler */
_x_err = 0;
XSync(d, False);
ph = XSetErrorHandler((XErrorHandler) TmpXError);
ph = XSetErrorHandler(TmpXError);
}
/* ask X to attach to the shared mem segment */
XShmAttach(d, si);
@ -85,7 +85,7 @@ __imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw, int depth,
/* wait for X to reply and do this */
XSync(d, False);
/* reset the error handler */
XSetErrorHandler((XErrorHandler) ph);
XSetErrorHandler(ph);
x_does_shm = 1;
}