gas: fix sign comparison warnings

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2016-11-03 12:58:21 -06:00
parent aab0c5afe2
commit 8da9f28157
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ Gas::getSample () {
void void
Gas::printGraph (thresholdContext* ctx, uint8_t resolution) { Gas::printGraph (thresholdContext* ctx, uint8_t resolution) {
std::cout << "(" << ctx->runningAverage << ") | "; 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::cout << std::endl; std::cout << std::endl;
} }

View File

@ -28,7 +28,7 @@
struct thresholdContext { struct thresholdContext {
long averageReading; long averageReading;
long runningAverage; unsigned long runningAverage;
int averagedOver; int averagedOver;
}; };