mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
CPUUsage (FreeBSD): silence compiler warnings
This commit is contained in:
@@ -12,7 +12,7 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
|
||||
if(sysctlbyname("kern.cp_times", NULL, &neededLength, NULL, 0) != 0)
|
||||
return "sysctlbyname(kern.cp_times, NULL) failed";
|
||||
|
||||
uint32_t coreCount = neededLength / (CPUSTATES * (uint32_t) sizeof(uint64_t));
|
||||
uint32_t coreCount = (uint32_t) (neededLength / (CPUSTATES * sizeof(uint64_t)));
|
||||
assert(coreCount > 0);
|
||||
|
||||
FF_AUTO_FREE uint64_t (*cpTimes)[CPUSTATES] = malloc(neededLength);
|
||||
|
||||
Reference in New Issue
Block a user