From 457399f3afa65293dc297655d6f4fd3607e02589 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 21 Sep 2025 12:23:49 -0600 Subject: [PATCH] preen --- esphome/components/esphome/ota/ota_esphome.cpp | 2 ++ esphome/components/esphome/ota/ota_esphome.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/esphome/components/esphome/ota/ota_esphome.cpp b/esphome/components/esphome/ota/ota_esphome.cpp index cf19a206e9..6089f744b8 100644 --- a/esphome/components/esphome/ota/ota_esphome.cpp +++ b/esphome/components/esphome/ota/ota_esphome.cpp @@ -514,6 +514,7 @@ void ESPHomeOTAComponent::yield_and_feed_watchdog_() { delay(1); } +#ifdef USE_OTA_PASSWORD void ESPHomeOTAComponent::log_auth_warning_(const LogString *action, const LogString *hash_name) { ESP_LOGW(TAG, "Auth: %s %s failed", LOG_STR_ARG(action), LOG_STR_ARG(hash_name)); } @@ -605,6 +606,7 @@ bool ESPHomeOTAComponent::perform_hash_auth_(HashBase *hasher, const std::string return matches; } +#endif // USE_OTA_PASSWORD } // namespace esphome #endif diff --git a/esphome/components/esphome/ota/ota_esphome.h b/esphome/components/esphome/ota/ota_esphome.h index 5d806028ac..8eaad9c99f 100644 --- a/esphome/components/esphome/ota/ota_esphome.h +++ b/esphome/components/esphome/ota/ota_esphome.h @@ -31,14 +31,16 @@ class ESPHomeOTAComponent : public ota::OTAComponent { protected: void handle_handshake_(); void handle_data_(); +#ifdef USE_OTA_PASSWORD bool perform_hash_auth_(HashBase *hasher, const std::string &password, size_t nonce_size, uint8_t auth_request, const LogString *name); + void log_auth_warning_(const LogString *action, const LogString *hash_name); +#endif // USE_OTA_PASSWORD bool readall_(uint8_t *buf, size_t len); bool writeall_(const uint8_t *buf, size_t len); void log_socket_error_(const LogString *msg); void log_read_error_(const LogString *what); void log_start_(const LogString *phase); - void log_auth_warning_(const LogString *action, const LogString *hash_name); void cleanup_connection_(); void yield_and_feed_watchdog_();