# HG changeset patch # User ib # Date 1308229792 0 # Node ID 729826b857cf652a46e9b20857d82ecc91080f46 # Parent 0dec83e053cc25117e62c4d1b20b6efffdca8024 Avoid compiler warnings. Remove unused parameter, use passed parameter instead of global variable or tag variable as unused to avoid warnings of unused variables. diff -r 0dec83e053cc -r 729826b857cf gui/interface.c --- a/gui/interface.c Thu Jun 16 12:44:28 2011 +0000 +++ b/gui/interface.c Thu Jun 16 13:09:52 2011 +0000 @@ -566,7 +566,7 @@ switch (type) { case guiXEvent: guiIntfStruct.event_struct = arg; - wsEvents(wsDisplay, arg, NULL); + wsEvents(wsDisplay, arg); gtkEventHandling(); break; diff -r 0dec83e053cc -r 729826b857cf gui/wm/ws.c --- a/gui/wm/ws.c Thu Jun 16 12:44:28 2011 +0000 +++ b/gui/wm/ws.c Thu Jun 16 13:09:52 2011 +0000 @@ -194,7 +194,7 @@ { char type[128]; - XGetErrorText(wsDisplay, Event->error_code, type, 128); + XGetErrorText(dpy, Event->error_code, type, 128); fprintf(stderr, "[ws] Error in display.\n"); fprintf(stderr, "[ws] Error code: %d ( %s )\n", Event->error_code, type); fprintf(stderr, "[ws] Request code: %d\n", Event->request_code); @@ -597,7 +597,7 @@ // Handle events. // ---------------------------------------------------------------------------------------------- -Bool wsEvents(Display *display, XEvent *Event, XPointer arg) +Bool wsEvents(Display *display, XEvent *Event) { unsigned long i = 0; int l; @@ -836,7 +836,7 @@ while (XPending(wsDisplay)) { XNextEvent(wsDisplay, &wsEvent); // printf("### X event: %d [%d]\n",wsEvent.type,delay); - wsEvents(wsDisplay, &wsEvent, NULL); + wsEvents(wsDisplay, &wsEvent); } } @@ -847,13 +847,13 @@ mp_msg(MSGT_GPLAYER, MSGL_V, "[ws] init threads: %d\n", XInitThreads()); XSynchronize(wsDisplay, False); XLockDisplay(wsDisplay); -// XIfEvent( wsDisplay,&wsEvent,wsEvents,NULL ); +// XIfEvent( wsDisplay,&wsEvent,wsEvents ); while (wsTrue) { // handle pending events while (XPending(wsDisplay)) { XNextEvent(wsDisplay, &wsEvent); - wsEvents(wsDisplay, &wsEvent, NULL); + wsEvents(wsDisplay, &wsEvent); delay = 0; } @@ -987,6 +987,8 @@ int dst_stride[4]; int i; + (void)Size; + sws_ctx = sws_getCachedContext(sws_ctx, win->xImage->width, win->xImage->height, PIX_FMT_RGB32, win->xImage->width, win->xImage->height, out_pix_fmt, SWS_POINT, NULL, NULL, NULL); diff -r 0dec83e053cc -r 729826b857cf gui/wm/ws.h --- a/gui/wm/ws.h Thu Jun 16 12:44:28 2011 +0000 +++ b/gui/wm/ws.h Thu Jun 16 13:09:52 2011 +0000 @@ -216,7 +216,7 @@ void wsDoExit(void); void wsMainLoop(void); -Bool wsEvents(Display *display, XEvent *Event, XPointer arg); +Bool wsEvents(Display *display, XEvent *Event); void wsHandleEvents(void); // ----------------------------------------------------------------------------------------------