rid "warning: cast from pointer to integer of different size" on 64-bit builds
This commit is contained in:
parent
8e9ab74eee
commit
d19ab5ae30
|
@ -468,12 +468,12 @@ int sigar_cpu_list_get(sigar_t *sigar, sigar_cpu_list_t *cpulist)
|
||||||
/* merge times of logical processors */
|
/* merge times of logical processors */
|
||||||
ent = sigar_cache_get(chips, chip_id);
|
ent = sigar_cache_get(chips, chip_id);
|
||||||
if (ent->value) {
|
if (ent->value) {
|
||||||
cpu = &cpulist->data[(int)ent->value-1];
|
cpu = &cpulist->data[(long)ent->value-1];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SIGAR_CPU_LIST_GROW(cpulist);
|
SIGAR_CPU_LIST_GROW(cpulist);
|
||||||
cpu = &cpulist->data[cpulist->number++];
|
cpu = &cpulist->data[cpulist->number++];
|
||||||
ent->value = (void *)(int)cpulist->number;
|
ent->value = (void *)(long)cpulist->number;
|
||||||
SIGAR_ZERO(cpu);
|
SIGAR_ZERO(cpu);
|
||||||
|
|
||||||
if (is_debug) {
|
if (is_debug) {
|
||||||
|
|
Loading…
Reference in New Issue