comparison dvdnav.c @ 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 8c87207b73ac
children 10c91a9d6a2e
comparison
equal deleted inserted replaced
420:d7720a050e67 421:ff5f3e53459b
1161 * than performing 32 ORs, we will access them as 32bits words. 1161 * than performing 32 ORs, we will access them as 32bits words.
1162 */ 1162 */
1163 union { 1163 union {
1164 user_ops_t ops_struct; 1164 user_ops_t ops_struct;
1165 uint32_t ops_int; 1165 uint32_t ops_int;
1166 } ops; 1166 } ops, tmp;
1167 1167
1168 ops.ops_int = 0; 1168 ops.ops_int = 0;
1169 1169
1170 if(!this->started) { 1170 if(!this->started) {
1171 printerr("Virtual DVD machine not started."); 1171 printerr("Virtual DVD machine not started.");
1172 return ops.ops_struct; 1172 return ops.ops_struct;
1173 } 1173 }
1174 1174
1175 pthread_mutex_lock(&this->vm_lock); 1175 pthread_mutex_lock(&this->vm_lock);
1176 ops.ops_int |= *(uint32_t*)&this->pci.pci_gi.vobu_uop_ctl; 1176 ops.ops_struct = this->pci.pci_gi.vobu_uop_ctl;
1177 1177
1178 if(this->vm && this->vm->state.pgc) 1178 if(this->vm && this->vm->state.pgc) {
1179 ops.ops_int |= *(uint32_t*)&this->vm->state.pgc->prohibited_ops; 1179 tmp.ops_struct = this->vm->state.pgc->prohibited_ops;
1180 ops.ops_int |= tmp.ops_int;
1181 }
1180 pthread_mutex_unlock(&this->vm_lock); 1182 pthread_mutex_unlock(&this->vm_lock);
1181 1183
1182 return ops.ops_struct; 1184 return ops.ops_struct;
1183 } 1185 }