# HG changeset patch # User rathann # Date 1355089502 0 # Node ID ff5f3e53459b9690864197ef1739bb7b439b693b # Parent d7720a050e6752fcfb57f530240c1ee0c378afea Fix strict aliasing warnings. Patch by Reimar Dffinger \Reimar.Doeffinger%gmx.de/ diff -r d7720a050e67 -r ff5f3e53459b dvdnav.c --- a/dvdnav.c Sun Dec 09 21:39:37 2012 +0000 +++ b/dvdnav.c Sun Dec 09 21:45:02 2012 +0000 @@ -1163,7 +1163,7 @@ union { user_ops_t ops_struct; uint32_t ops_int; - } ops; + } ops, tmp; ops.ops_int = 0; @@ -1173,10 +1173,12 @@ } pthread_mutex_lock(&this->vm_lock); - ops.ops_int |= *(uint32_t*)&this->pci.pci_gi.vobu_uop_ctl; + ops.ops_struct = this->pci.pci_gi.vobu_uop_ctl; - if(this->vm && this->vm->state.pgc) - ops.ops_int |= *(uint32_t*)&this->vm->state.pgc->prohibited_ops; + if(this->vm && this->vm->state.pgc) { + tmp.ops_struct = this->vm->state.pgc->prohibited_ops; + ops.ops_int |= tmp.ops_int; + } pthread_mutex_unlock(&this->vm_lock); return ops.ops_struct;