diff --git a/src/gas/gas.cxx b/src/gas/gas.cxx index 06855aeb..ac261102 100644 --- a/src/gas/gas.cxx +++ b/src/gas/gas.cxx @@ -92,7 +92,7 @@ Gas::getSample () { void Gas::printGraph (thresholdContext* ctx, uint8_t resolution) { std::cout << "(" << ctx->runningAverage << ") | "; - for (int i = 0; i < ctx->runningAverage / resolution; i++) + for (unsigned int i = 0; i < ctx->runningAverage / resolution; i++) std::cout << "*"; std::cout << std::endl; } diff --git a/src/gas/gas.hpp b/src/gas/gas.hpp index 60b7a8f2..00f59b7a 100644 --- a/src/gas/gas.hpp +++ b/src/gas/gas.hpp @@ -28,7 +28,7 @@ struct thresholdContext { long averageReading; - long runningAverage; + unsigned long runningAverage; int averagedOver; };