[vlc-commits] MSW vouts: fix warnings

Rémi Denis-Courmont git at videolan.org
Sat May 14 15:22:35 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 14 16:21:15 2011 +0300| [4d37034c178053ff6bd76899df5b3a984d1dd322] | committer: Rémi Denis-Courmont

MSW vouts: fix warnings

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d37034c178053ff6bd76899df5b3a984d1dd322
---

 modules/video_output/msw/common.c  |    5 +++--
 modules/video_output/msw/directx.c |    8 ++++++--
 modules/video_output/msw/events.c  |    2 +-
 modules/video_output/msw/events.h  |    2 +-
 modules/video_output/msw/wingdi.c  |    2 +-
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index cb55e8f..97daadc 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -290,11 +290,12 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
 
     CoInitialize(0);
 
-    LPTASKBARLIST3 taskbl;
+    void *ptr;
     if (S_OK == CoCreateInstance(&clsid_ITaskbarList,
                                  NULL, CLSCTX_INPROC_SERVER,
                                  &IID_ITaskbarList3,
-                                 &taskbl)) {
+                                 &ptr)) {
+        LPTASKBARLIST3 taskbl = ptr;
         taskbl->vt->HrInit(taskbl);
 
         HWND hroot = GetAncestor(sys->hwnd,GA_ROOT);
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index 35dd5fb..ca7fed4 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -602,8 +602,9 @@ static int DirectXOpenDDraw(vout_display_t *vd)
     }
 
     /* Get the IDirectDraw2 interface */
+    void *ptr;
     hr = IDirectDraw_QueryInterface(ddobject, &IID_IDirectDraw2,
-                                    &sys->ddobject);
+                                    &ptr);
     /* Release the unused interface */
     IDirectDraw_Release(ddobject);
 
@@ -612,6 +613,7 @@ static int DirectXOpenDDraw(vout_display_t *vd)
         sys->ddobject = NULL;
         return VLC_EGENERIC;
     }
+    sys->ddobject = ptr;
 
     /* Set DirectDraw Cooperative level, ie what control we want over Windows
      * display */
@@ -783,8 +785,9 @@ static int DirectXOpenDisplay(vout_display_t *vd)
         return VLC_EGENERIC;
     }
 
+    void *ptr;
     hr = IDirectDrawSurface_QueryInterface(display, &IID_IDirectDrawSurface2,
-                                           &sys->display);
+                                           &ptr);
     /* Release the old interface */
     IDirectDrawSurface_Release(display);
 
@@ -793,6 +796,7 @@ static int DirectXOpenDisplay(vout_display_t *vd)
         sys->display = NULL;
         return VLC_EGENERIC;
     }
+    sys->display = ptr;
 
     /* The clipper will be used only in non-overlay mode */
     DirectXCreateClipper(vd);
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index def6f7e..85f715e 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -1011,7 +1011,7 @@ int EventThreadGetWindowStyle( event_thread_t *p_event )
 
 void EventThreadUpdateWindowPosition( event_thread_t *p_event,
                                       bool *pb_moved, bool *pb_resized,
-                                      int x, int y, int w, int h )
+                                      int x, int y, unsigned w, unsigned h )
 {
     vlc_mutex_lock( &p_event->lock );
     *pb_moved   = x != p_event->wnd_cfg.x ||
diff --git a/modules/video_output/msw/events.h b/modules/video_output/msw/events.h
index 2b21965..598179e 100644
--- a/modules/video_output/msw/events.h
+++ b/modules/video_output/msw/events.h
@@ -53,7 +53,7 @@ void            EventThreadMouseHide( event_thread_t * );
 void            EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
 int             EventThreadGetWindowStyle( event_thread_t * );
 void            EventThreadUpdateWindowPosition( event_thread_t *, bool *pb_moved, bool *pb_resized,
-                                                 int x, int y, int w, int h );
+                                                 int x, int y, unsigned w, unsigned h );
 void            EventThreadUpdateSourceAndPlace( event_thread_t *p_event,
                                                  const video_format_t *p_source,
                                                  const vout_display_place_t *p_place );
diff --git a/modules/video_output/msw/wingdi.c b/modules/video_output/msw/wingdi.c
index feace3f..84ee4ba 100644
--- a/modules/video_output/msw/wingdi.c
+++ b/modules/video_output/msw/wingdi.c
@@ -345,7 +345,7 @@ static int Init(vout_display_t *vd,
     fmt->i_width  = width;
     fmt->i_height = height;
 
-    uint8_t *p_pic_buffer;
+    void *p_pic_buffer;
     int     i_pic_pitch;
 #ifdef MODULE_NAME_IS_wingapi
     GXOpenDisplay(sys->hvideownd, GX_FULLSCREEN);



More information about the vlc-commits mailing list