mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Fail travis CI on compiler warnings
This commit is contained in:

committed by
cgzones

parent
475f729a36
commit
efb971f9df
@ -391,7 +391,7 @@ void ProcessList_goThroughEntries(ProcessList* this) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
struct kinfo_proc* kproc = &kprocs[i];
|
||||
bool preExisting = false;
|
||||
bool isIdleProcess = false;
|
||||
// TODO: bool isIdleProcess = false;
|
||||
struct tm date;
|
||||
Process* proc = ProcessList_getProcess(this, kproc->ki_pid, &preExisting, (Process_New) FreeBSDProcess_new);
|
||||
FreeBSDProcess* fp = (FreeBSDProcess*) proc;
|
||||
@ -449,12 +449,15 @@ void ProcessList_goThroughEntries(ProcessList* this) {
|
||||
proc->percent_cpu = 100.0 * ((double)kproc->ki_pctcpu / (double)kernelFScale);
|
||||
proc->percent_mem = 100.0 * (proc->m_resident * PAGE_SIZE_KB) / (double)(this->totalMem);
|
||||
|
||||
if (proc->percent_cpu > 0.1) {
|
||||
// system idle process should own all CPU time left regardless of CPU count
|
||||
if ( strcmp("idle", kproc->ki_comm) == 0 ) {
|
||||
isIdleProcess = true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* TODO
|
||||
* if (proc->percent_cpu > 0.1) {
|
||||
* // system idle process should own all CPU time left regardless of CPU count
|
||||
* if ( strcmp("idle", kproc->ki_comm) == 0 ) {
|
||||
* isIdleProcess = true;
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
|
||||
proc->priority = kproc->ki_pri.pri_level - PZERO;
|
||||
|
||||
|
Reference in New Issue
Block a user