Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hwpmc/hwpmc_powerpc.c
Show First 20 Lines • Show All 598 Lines • ▼ Show 20 Lines | pmc_md_initialize() | ||||
} | } | ||||
if (error != 0) { | if (error != 0) { | ||||
pmc_mdep_free(pmc_mdep); | pmc_mdep_free(pmc_mdep); | ||||
pmc_mdep = NULL; | pmc_mdep = NULL; | ||||
} | } | ||||
/* Set the value for kern.hwpmc.cpuid */ | /* Set the value for kern.hwpmc.cpuid */ | ||||
snprintf(pmc_cpuid, sizeof(pmc_cpuid), "%08jx", (uintmax_t)mfpvr()); | snprintf(pmc_cpuid, sizeof(pmc_cpuid), "%08x", mfpvr()); | ||||
imp: mfpvr() doesn't return an int now, but a uint32_t which can be either an int or a long. so… | |||||
return (pmc_mdep); | return (pmc_mdep); | ||||
} | } | ||||
void | void | ||||
pmc_md_finalize(struct pmc_mdep *md) | pmc_md_finalize(struct pmc_mdep *md) | ||||
{ | { | ||||
Show All 36 Lines |
mfpvr() doesn't return an int now, but a uint32_t which can be either an int or a long. so there's still a mismatch here, just not one the compiler warns about. In the past, this would be a sure way to get a mismatch between 32-bit and 64-bit compiles, but it seems we've moved to always defining uint32_t as an unsigned int. At least the 'x' format is unsigned...