diff gui/wm/ws.c @ 33541:729826b857cf

Avoid compiler warnings. Remove unused parameter, use passed parameter instead of global variable or tag variable as unused to avoid warnings of unused variables.
author ib
date Thu, 16 Jun 2011 13:09:52 +0000
parents 0dec83e053cc
children 107084241b00
line wrap: on
line diff
--- 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);