Commit bd93b2e1 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Initialize variables, silence warnings.

parent 71190654
......@@ -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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment