Win32: remove "dereferencing type-punned pointer will break strict-aliasing rules...
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 25 Aug 2009 19:04:51 +0000 (21:04 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 25 Aug 2009 19:05:56 +0000 (21:05 +0200)
At least it compiles...

modules/video_output/msw/direct3d.c
modules/video_output/msw/directx.c
modules/video_output/msw/wingdi.c

index 823f7b1..fd251a6 100644 (file)
@@ -1375,7 +1375,7 @@ static void Direct3DVoutRenderScene( vout_thread_t *p_vout, picture_t *p_pic )
     }
 
     /* Update the vertex buffer */
-    hr = IDirect3DVertexBuffer9_Lock(p_d3dvtc, 0, 0, (VOID **)(&p_vertices), D3DLOCK_DISCARD);
+    hr = IDirect3DVertexBuffer9_Lock(p_d3dvtc, 0, 0, (&p_vertices), D3DLOCK_DISCARD);
     if( FAILED(hr) )
     {
         msg_Dbg( p_vout, "%s:%d (hr=0x%0lX)", __FUNCTION__, __LINE__, hr);
index 94e410b..0b825b2 100644 (file)
@@ -880,7 +880,7 @@ static int DirectXInitDDraw( vout_thread_t *p_vout )
 
     /* Get the IDirectDraw2 interface */
     dxresult = IDirectDraw_QueryInterface( p_ddobject, &IID_IDirectDraw2,
-                                        (LPVOID *)&p_vout->p_sys->p_ddobject );
+                                        &p_vout->p_sys->p_ddobject );
     /* Release the unused interface */
     IDirectDraw_Release( p_ddobject );
     if( dxresult != DD_OK )
@@ -969,7 +969,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout )
 
     dxresult = IDirectDrawSurface_QueryInterface( p_display,
                                          &IID_IDirectDrawSurface2,
-                                         (LPVOID *)&p_vout->p_sys->p_display );
+                                         &p_vout->p_sys->p_display );
     /* Release the old interface */
     IDirectDrawSurface_Release( p_display );
     if ( dxresult != DD_OK )
index 7e5a3b6..16214d0 100644 (file)
@@ -802,7 +802,7 @@ static void InitBuffers( vout_thread_t *p_vout )
 
     p_vout->p_sys->off_bitmap =
         CreateDIBSection( window_dc, (BITMAPINFO *)p_header, DIB_RGB_COLORS,
-                          (void**)&p_vout->p_sys->p_pic_buffer, NULL, 0 );
+                          &p_vout->p_sys->p_pic_buffer, NULL, 0 );
 
     p_vout->p_sys->off_dc = CreateCompatibleDC( window_dc );