fix compiler warnings

This commit is contained in:
Dawid Chyrzynski
2024-02-10 00:40:42 +01:00
parent 105e96197b
commit 2a00dcd65f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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;
}