mirror of https://github.com/xzeldon/htop.git
Initialize variables, silence warnings.
This commit is contained in:
parent
71190654bc
commit
bd93b2e1d7
|
@ -16,6 +16,7 @@ in the source distribution for its full text.
|
|||
#include <libproc.h>
|
||||
#include <sys/mman.h>
|
||||
#include <utmpx.h>
|
||||
#include <err.h>
|
||||
|
||||
/*{
|
||||
#include "ProcessList.h"
|
||||
|
|
|
@ -167,7 +167,10 @@ ProcessPidColumn Process_pidColumns[] = {
|
|||
static double Platform_setCPUAverageValues(Meter* mtr) {
|
||||
DarwinProcessList *dpl = (DarwinProcessList *)mtr->pl;
|
||||
int cpus = dpl->super.cpuCount;
|
||||
double sumNice, sumNormal, sumKernel, sumPercent;
|
||||
double sumNice = 0.0;
|
||||
double sumNormal = 0.0;
|
||||
double sumKernel = 0.0;
|
||||
double sumPercent = 0.0;
|
||||
for (int i = 1; i <= cpus; i++) {
|
||||
sumPercent += Platform_setCPUValues(mtr, i);
|
||||
sumNice += mtr->values[CPU_METER_NICE];
|
||||
|
|
Loading…
Reference in New Issue