fix some compilation warnings regarding typcase of (CPUState *)

This commit is contained in:
Nguyen Anh Quynh 2016-10-26 17:05:26 +08:00
parent 44ab083d9b
commit 1f65b76fbd
3 changed files with 5 additions and 4 deletions

View file

@ -20,7 +20,7 @@
static int tosa_init(struct uc_struct *uc, MachineState *machine)
{
//cpu_arm_init(uc, "pxa255");
uc->cpu = cpu_arm_init(uc, "cortex-a15"); // FIXME
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-a15"); // FIXME
return 0;
}

View file

@ -54,7 +54,8 @@ static int machvirt_init(struct uc_struct *uc, MachineState *machine)
return -1;
}
uc->cpu = cpuobj = object_new(uc, object_class_get_name(oc));
cpuobj = object_new(uc, object_class_get_name(oc));
uc->cpu = (CPUState *)cpuobj;
object_property_set_bool(uc, cpuobj, true, "realized", NULL);
}

View file

@ -104,7 +104,7 @@ static X86CPU *pc_new_cpu(struct uc_struct *uc, const char *cpu_model, int64_t a
}
object_property_set_int(uc, OBJECT(cpu), apic_id, "apic-id", &local_err);
object_property_set_bool(uc, OBJECT(cpu), true, "realized", &local_err); // qq
object_property_set_bool(uc, OBJECT(cpu), true, "realized", &local_err);
if (local_err) {
error_propagate(errp, local_err);
@ -129,7 +129,7 @@ int pc_cpus_init(struct uc_struct *uc, const char *cpu_model)
}
for (i = 0; i < smp_cpus; i++) {
uc->cpu = pc_new_cpu(uc, cpu_model, x86_cpu_apic_id_from_index(i), &error); // qq
uc->cpu = (CPUState *)pc_new_cpu(uc, cpu_model, x86_cpu_apic_id_from_index(i), &error);
if (error) {
//error_report("%s", error_get_pretty(error));
error_free(error);