mirror of
https://github.com/alexhopeoconnor/arduino-home-assistant.git
synced 2026-10-04 02:48:13 +10:00
fix compiler warnings
This commit is contained in:
@@ -174,7 +174,7 @@ bool HASelect::publishState(const int8_t state)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (state == -1) {
|
||||
if (state < 0) {
|
||||
return publishOnDataTopic(AHATOFSTR(HAStateTopic), AHATOFSTR(HAStateNone), true);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ bool HASerializerArray::add(ItemType item)
|
||||
|
||||
const char* HASerializerArray::getItem(const uint8_t index) const
|
||||
{
|
||||
if (index < 0 || index >= _itemsNb) {
|
||||
if (index >= _itemsNb) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user