[vlc-devel] commit: Win32: remove " dereferencing type-punned pointer will break strict-aliasing rules" and bring "passing argument ... from incompatible pointer type ( Jean-Baptiste Kempf )

Pierre d'Herbemont pdherbemont at gmail.com
Tue Aug 25 21:12:48 CEST 2009


Jb,

An other option is to use VLC_SET_WERROR([module], []) hence you keep  
the original warning but don't break the win32 module compilation.

Anyway, thanks for taking good care of our windows developers and users!

Pierre

On Aug 25, 2009, at 9:06 PM, git at videolan.org (git version control)  
wrote:

> vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue  
> Aug 25 21:04:51 2009 +0200|  
> [ea88cefe21daffa6eba3e5e2562dd356bdfab530] | committer: Jean- 
> Baptiste Kempf
>
> Win32: remove "dereferencing type-punned pointer will break strict- 
> aliasing rules" and bring "passing argument ... from incompatible  
> pointer type
>
> At least it compiles...
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea88cefe21daffa6eba3e5e2562dd356bdfab530
> ---
>
> modules/video_output/msw/direct3d.c |    2 +-
> modules/video_output/msw/directx.c  |    4 ++--
> modules/video_output/msw/wingdi.c   |    2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/modules/video_output/msw/direct3d.c b/modules/ 
> video_output/msw/direct3d.c
> index 823f7b1..fd251a6 100644
> --- a/modules/video_output/msw/direct3d.c
> +++ b/modules/video_output/msw/direct3d.c
> @@ -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);
> diff --git a/modules/video_output/msw/directx.c b/modules/ 
> video_output/msw/directx.c
> index 94e410b..0b825b2 100644
> --- a/modules/video_output/msw/directx.c
> +++ b/modules/video_output/msw/directx.c
> @@ -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 )
> diff --git a/modules/video_output/msw/wingdi.c b/modules/ 
> video_output/msw/wingdi.c
> index 7e5a3b6..16214d0 100644
> --- a/modules/video_output/msw/wingdi.c
> +++ b/modules/video_output/msw/wingdi.c
> @@ -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 );
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list