[DVDnav-discuss] r1248 - trunk/libdvdnav/src/dvdnav.c

rathann subversion at mplayerhq.hu
Sun Dec 9 22:45:03 CET 2012


Author: rathann
Date: Sun Dec  9 22:45:02 2012
New Revision: 1248

Log:
Fix strict aliasing warnings.

Patch by Reimar Döffinger \Reimar.Doeffinger%gmx.de/

Modified:
   trunk/libdvdnav/src/dvdnav.c

Modified: trunk/libdvdnav/src/dvdnav.c
==============================================================================
--- trunk/libdvdnav/src/dvdnav.c	Sun Dec  9 22:39:37 2012	(r1247)
+++ trunk/libdvdnav/src/dvdnav.c	Sun Dec  9 22:45:02 2012	(r1248)
@@ -1163,7 +1163,7 @@ user_ops_t dvdnav_get_restrictions(dvdna
   union {
     user_ops_t ops_struct;
     uint32_t   ops_int;
-  } ops;
+  } ops, tmp;
 
   ops.ops_int = 0;
 
@@ -1173,10 +1173,12 @@ user_ops_t dvdnav_get_restrictions(dvdna
   }
 
   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;


More information about the DVDnav-discuss mailing list