mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-15 09:54:33 +12:00
get rid of warnings
This commit is contained in:
parent
81b63652bf
commit
cd644cfc55
|
@ -339,7 +339,7 @@ namespace Cpu {
|
|||
|
||||
cpu.load_avg = { (float)avg[0], (float)avg[1], (float)avg[2]};
|
||||
|
||||
long cpu_time[Shared::coreCount][CPUSTATES];
|
||||
long cpu_time[256][CPUSTATES]; // 256 should be enough, can't have variable array length :-/
|
||||
|
||||
size_t size = sizeof(cpu_time);
|
||||
if (sysctlbyname("kern.cp_times", &cpu_time, &size, NULL, 0) == -1) {
|
||||
|
@ -439,9 +439,6 @@ namespace Mem {
|
|||
return Shared::totalMem;
|
||||
}
|
||||
|
||||
void collect_disk(unordered_flat_map<string, disk_info> &disks, unordered_flat_map<string, string> &mapping) {
|
||||
}
|
||||
|
||||
auto collect(const bool no_update) -> mem_info & {
|
||||
if (Runner::stopping or (no_update and not current_mem.percent.at("used").empty()))
|
||||
return current_mem;
|
||||
|
@ -601,7 +598,6 @@ namespace Mem {
|
|||
mem.disks_order.push_back(name);
|
||||
|
||||
disk_ios = 0;
|
||||
collect_disk(disks, mapping);
|
||||
|
||||
old_uptime = uptime;
|
||||
}
|
||||
|
@ -1011,6 +1007,7 @@ namespace Proc {
|
|||
char** argv = kvm_getargv(kd, kproc, 0);
|
||||
if (argv) {
|
||||
for (int i = 0; argv[i]; i++) {
|
||||
new_proc.cmd += " ";
|
||||
new_proc.cmd += argv[i];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue