changeset 421:ff5f3e53459b src

Fix strict aliasing warnings. Patch by Reimar Dffinger \Reimar.Doeffinger%gmx.de/
author rathann
date Sun, 09 Dec 2012 21:45:02 +0000
parents d7720a050e67
children 3d942df13d3a
files dvdnav.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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;