From 630d12d9634fee25cc7db6e1fa9081f3988f41e8 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Thu, 3 Nov 2016 13:13:13 -0600 Subject: [PATCH] mic: fix sign comparison warnings Signed-off-by: Jon Trulson --- src/mic/mic.cxx | 2 +- src/mic/mic.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mic/mic.cxx b/src/mic/mic.cxx index 970c7163..9928335a 100644 --- a/src/mic/mic.cxx +++ b/src/mic/mic.cxx @@ -100,7 +100,7 @@ Microphone::findThreshold (thresholdContext* ctx, unsigned int threshold, void Microphone::printGraph (thresholdContext* ctx) { - for (int i = 0; i < ctx->runningAverage; i++) + for (unsigned int i = 0; i < ctx->runningAverage; i++) std::cout << "."; std::cout << std::endl; } diff --git a/src/mic/mic.hpp b/src/mic/mic.hpp index f54147dc..3aeafbb1 100644 --- a/src/mic/mic.hpp +++ b/src/mic/mic.hpp @@ -29,7 +29,7 @@ struct thresholdContext { long averageReading; - long runningAverage; + unsigned long runningAverage; int averagedOver; };