Cleaned up C++ compiler warnings

All C++ projects now build without warnings with -Wall and -Wextra

Change-Id: Idb6cf8b78274a30453e98c1e8edabcfb2a7fffb6
This commit is contained in:
Thomas Clark
2014-08-05 11:48:47 -04:00
parent 1be31431bc
commit f4ace4a36d
10 changed files with 66 additions and 76 deletions

View File

@@ -102,7 +102,7 @@ bool checkAnalogModule(uint8_t module) {
* @return Analog channel is valid
*/
bool checkAnalogInputChannel(uint32_t pin) {
if (pin >= 0 && pin < kAnalogInputPins)
if (pin < kAnalogInputPins)
return true;
return false;
}
@@ -115,7 +115,7 @@ bool checkAnalogInputChannel(uint32_t pin) {
* @return Analog channel is valid
*/
bool checkAnalogOutputChannel(uint32_t pin) {
if (pin >= 0 && pin < kAnalogOutputPins)
if (pin < kAnalogOutputPins)
return true;
return false;
}