mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
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:
committed by
Brad Miller (WPI)
parent
974e301a8b
commit
f4d84cdd4f
@@ -40,7 +40,6 @@ class DigitalInput : public DigitalSource, public LiveWindowSendable {
|
||||
|
||||
private:
|
||||
uint32_t m_channel;
|
||||
bool m_lastValue;
|
||||
|
||||
ITable *m_table = nullptr;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user