[MPlayer-cvslog] r33629 - in trunk/gui: interface.c wm/ws.c wm/ws.h

ib subversion at mplayerhq.hu
Thu Jun 16 15:09:52 CEST 2011


Author: ib
Date: Thu Jun 16 15:09:52 2011
New Revision: 33629

Log:
Avoid compiler warnings.

Remove unused parameter, use passed parameter instead of global variable
or tag variable as unused to avoid warnings of unused variables.

Modified:
   trunk/gui/interface.c
   trunk/gui/wm/ws.c
   trunk/gui/wm/ws.h

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Thu Jun 16 14:44:28 2011	(r33628)
+++ trunk/gui/interface.c	Thu Jun 16 15:09:52 2011	(r33629)
@@ -566,7 +566,7 @@ int guiGetEvent(int type, void *arg)
     switch (type) {
     case guiXEvent:
         guiIntfStruct.event_struct = arg;
-        wsEvents(wsDisplay, arg, NULL);
+        wsEvents(wsDisplay, arg);
         gtkEventHandling();
         break;
 

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Thu Jun 16 14:44:28 2011	(r33628)
+++ trunk/gui/wm/ws.c	Thu Jun 16 15:09:52 2011	(r33629)
@@ -194,7 +194,7 @@ static int wsErrorHandler(Display *dpy, 
 {
     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 @@ void wsDestroyWindow(wsTWindow *win)
 //   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 @@ void wsHandleEvents(void)
     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 @@ void wsMainLoop(void)
     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 @@ void wsConvert(wsTWindow *win, unsigned 
     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);

Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h	Thu Jun 16 14:44:28 2011	(r33628)
+++ trunk/gui/wm/ws.h	Thu Jun 16 15:09:52 2011	(r33629)
@@ -216,7 +216,7 @@ int wsGetDepthOnScreen(void);
 
 void wsDoExit(void);
 void wsMainLoop(void);
-Bool wsEvents(Display *display, XEvent *Event, XPointer arg);
+Bool wsEvents(Display *display, XEvent *Event);
 void wsHandleEvents(void);
 
 // ----------------------------------------------------------------------------------------------


More information about the MPlayer-cvslog mailing list