[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 )

git version control git at videolan.org
Tue Aug 25 21:15:43 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Aug 25 21:15:08 2009 +0200| [8299ae68e7d6c9c74446b3259db730f06a7bb5cb] | 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, and there is absolutly no way I dig in that code.

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

 modules/codec/dmo/dmo.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index 4be0bf3..b2c183e 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -781,7 +781,7 @@ loader:
     }
 
     i_err = GetClass( codecs_table[i_codec].p_guid, &IID_IClassFactory,
-                      (void**)&cFactory );
+                      &cFactory );
     if( i_err || cFactory == NULL )
     {
         msg_Dbg( p_this, "no such class object" );
@@ -790,7 +790,7 @@ loader:
     }
 
     i_err = cFactory->vt->CreateInstance( cFactory, 0, &IID_IUnknown,
-                                          (void**)&cObject );
+                                          &cObject );
     cFactory->vt->Release( (IUnknown*)cFactory );
     if( i_err || !cObject )
     {
@@ -799,7 +799,7 @@ loader:
         return VLC_EGENERIC;
     }
     i_err = cObject->vt->QueryInterface( cObject, &IID_IMediaObject,
-                                        (void**)pp_dmo );
+                                        pp_dmo );
     cObject->vt->Release( (IUnknown*)cObject );
     if( i_err || !*pp_dmo )
     {
@@ -1200,7 +1200,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
 
         i_err = p_dmo->vt->QueryInterface( (IUnknown *)p_dmo,
                                            &IID_IWMCodecPrivateData,
-                                           (void **)&p_privdata );
+                                           &p_privdata );
         if( i_err ) break;
 
         i_err = p_privdata->vt->SetPartialOutputType( p_privdata, &dmo_type );




More information about the vlc-devel mailing list