Fixed potentially uninitialized value warnings emitted by clang

Removed unused variable from DigitalInput class

Removed extraneous explicit std::string conversions in Preferences class

Change-Id: Ia445abfd136a7b3e7f0491ed22aaa057814bcc8f
This commit is contained in:
Tyler Veness
2015-06-17 19:01:18 -07:00
committed by Brad Miller (WPI)
parent 974e301a8b
commit f4d84cdd4f
3 changed files with 5 additions and 6 deletions

View File

@@ -40,7 +40,6 @@ class DigitalInput : public DigitalSource, public LiveWindowSendable {
private:
uint32_t m_channel;
bool m_lastValue;
ITable *m_table = nullptr;
};

View File

@@ -663,7 +663,7 @@ void CANJaguar::verify() {
}
if (!m_pVerified) {
uint32_t message;
uint32_t message = 0;
if (m_controlMode == kSpeed)
message = LM_API_SPD_PC;
@@ -693,7 +693,7 @@ void CANJaguar::verify() {
}
if (!m_iVerified) {
uint32_t message;
uint32_t message = 0;
if (m_controlMode == kSpeed)
message = LM_API_SPD_IC;
@@ -723,7 +723,7 @@ void CANJaguar::verify() {
}
if (!m_dVerified) {
uint32_t message;
uint32_t message = 0;
if (m_controlMode == kSpeed)
message = LM_API_SPD_DC;

View File

@@ -336,9 +336,9 @@ std::string Preferences::Get(const char *key) {
Synchronized sync(m_tableLock);
if (key == nullptr) {
wpi_setWPIErrorWithContext(NullParameter, "key");
return std::string("");
return "";
}
return m_values[std::string(key)];
return m_values[key];
}
/**