fix some compilation warnings regarding typcase of (CPUState *)
This commit is contained in:
parent
44ab083d9b
commit
1f65b76fbd
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user