Skip to content

Commit

Permalink
Compiler warnings fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PBrunot committed Jul 21, 2024
1 parent dcb8eac commit 31a6193
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/SavedConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ namespace fabomatic
[[nodiscard]] static auto DefaultConfig() -> SavedConfig;

/// @brief Increments the boot count and saves it to EEPROM
static auto IncrementBootCount() -> size_t;
[[maybe_unused]] static auto IncrementBootCount() -> size_t;
};

} // namespace fabomatic
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ void setup()
auto hw_init = logic.configure(rfid, lcd);
hw_init &= logic.initBoard();

const auto count = fabomatic::SavedConfig::IncrementBootCount();
[[maybe_unused]] const auto count = fabomatic::SavedConfig::IncrementBootCount();
ESP_LOGI(TAG, "Boot count: %d, reset reason: %d", count, esp_reset_reason());

logic.changeStatus(Status::Booting);
Expand Down
8 changes: 4 additions & 4 deletions src/mock/MockMQTTBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace fabomatic
case NewClient_sMQTTEventType:
{
// Handle new client connection event
auto *e = static_cast<sMQTTNewClientEvent *>(event);
[[maybe_unused]] auto *e = static_cast<sMQTTNewClientEvent *>(event);
ESP_LOGD(TAG2, "MQTT BROKER: client connected, id:%s", e->Client()->getClientId().c_str());
}
break;
Expand All @@ -69,7 +69,7 @@ namespace fabomatic
case RemoveClient_sMQTTEventType:
{
// Handle client removal event
auto *e = static_cast<sMQTTRemoveClientEvent *>(event);
[[maybe_unused]] auto *e = static_cast<sMQTTRemoveClientEvent *>(event);
ESP_LOGD(TAG2, "MQTT BROKER: removed client id: %s", e->Client()->getClientId().c_str());
}
break;
Expand All @@ -83,14 +83,14 @@ namespace fabomatic
case Subscribe_sMQTTEventType:
{
// Handle subscription event
auto *e = static_cast<sMQTTSubUnSubClientEvent *>(event);
[[maybe_unused]] auto *e = static_cast<sMQTTSubUnSubClientEvent *>(event);
ESP_LOGD(TAG2, "MQTT BROKER: client %s subscribed to %s", e->Client()->getClientId().c_str(), e->Topic().c_str());
}
break;
case UnSubscribe_sMQTTEventType:
{
// Handle unsubscription event
auto *e = static_cast<sMQTTSubUnSubClientEvent *>(event);
[[maybe_unused]] auto *e = static_cast<sMQTTSubUnSubClientEvent *>(event);
ESP_LOGD(TAG2, "MQTT BROKER: got unsubscribe from %s", e->Topic().c_str());
}
break;
Expand Down

0 comments on commit 31a6193

Please sign in to comment.