Fixed current and potential bugs caught by Coverity

Change-Id: I9f9d09dc797ffea062eeb49c881be1d5acb63d7b
This commit is contained in:
Tyler Veness
2015-11-15 14:49:50 -08:00
committed by Peter Johnson
parent b0fec4089b
commit 055ee09825
34 changed files with 105 additions and 65 deletions

View File

@@ -11,6 +11,7 @@
#include "WPIErrors.h"
#include "LiveWindow/LiveWindow.h"
#include <limits>
#include <sstream>
/**
@@ -25,6 +26,7 @@ DigitalInput::DigitalInput(uint32_t channel) {
if (!CheckDigitalChannel(channel)) {
buf << "Digital Channel " << channel;
wpi_setWPIErrorWithContext(ChannelIndexOutOfRange, buf.str());
m_channel = std::numeric_limits<uint32_t>::max();
return;
}
m_channel = channel;