evas sw x11 - warn - use void ptr for error handler

warnings now are being super picky with:

../src/modules/evas/engines/software_x11/evas_xlib_buffer.c: In
function ‘evas_software_xlib_x_output_buffer_new’:
../src/modules/evas/engines/software_x11/evas_xlib_buffer.c:306:56:
warning: cast between incompatible function types from ‘void
(*)(Display *, XErrorEvent *)’ {aka ‘void (*)(struct _XDisplay *,
struct <anonymous> *)’} to ‘int (*)(Display *, XErrorEvent *)’ {aka
‘int (*)(struct _XDisplay *, struct <anonymous> *)’}
[-Wcast-function-type]
                                  ph = XSetErrorHandler((XErrorHandler)

can we really match a struct <anonymous> somehow? i don't think so...
so... void to the rescue.
This commit is contained in:
Carsten Haitzler 2018-11-08 15:36:38 +00:00
parent 7090e49335
commit df5702a609
1 changed files with 1 additions and 2 deletions

View File

@ -303,8 +303,7 @@ evas_software_xlib_x_output_buffer_new(Display *d, Visual *v, int depth, int w,
{
XSync(d, False);
_x_err = 0;
ph = XSetErrorHandler((XErrorHandler)
x_output_tmp_x_err);
ph = XSetErrorHandler((void *)x_output_tmp_x_err);
}
#if defined(LIBXEXT_VERSION_LOW)
/* workaround for libXext of lower then 1.1.1 */