From 89b1b12993f44b1c29cff0a08606a7f5cd1ce3d0 Mon Sep 17 00:00:00 2001 From: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com> Date: Wed, 23 Apr 2025 18:47:15 +1000 Subject: [PATCH] [online_image] Fix printf format; comment fixes (#8607) --- esphome/components/online_image/online_image.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/online_image/online_image.cpp b/esphome/components/online_image/online_image.cpp index 3411018901..cb4a3be9e8 100644 --- a/esphome/components/online_image/online_image.cpp +++ b/esphome/components/online_image/online_image.cpp @@ -111,7 +111,7 @@ void OnlineImage::update() { case ImageFormat::BMP: accept_mime_type = "image/bmp"; break; -#endif // ONLINE_IMAGE_BMP_SUPPORT +#endif // USE_ONLINE_IMAGE_BMP_SUPPORT #ifdef USE_ONLINE_IMAGE_JPEG_SUPPORT case ImageFormat::JPEG: accept_mime_type = "image/jpeg"; @@ -121,7 +121,7 @@ void OnlineImage::update() { case ImageFormat::PNG: accept_mime_type = "image/png"; break; -#endif // ONLINE_IMAGE_PNG_SUPPORT +#endif // USE_ONLINE_IMAGE_PNG_SUPPORT default: accept_mime_type = "image/*"; } @@ -159,7 +159,7 @@ void OnlineImage::update() { ESP_LOGD(TAG, "Allocating BMP decoder"); this->decoder_ = make_unique(this); } -#endif // ONLINE_IMAGE_BMP_SUPPORT +#endif // USE_ONLINE_IMAGE_BMP_SUPPORT #ifdef USE_ONLINE_IMAGE_JPEG_SUPPORT if (this->format_ == ImageFormat::JPEG) { ESP_LOGD(TAG, "Allocating JPEG decoder"); @@ -171,7 +171,7 @@ void OnlineImage::update() { ESP_LOGD(TAG, "Allocating PNG decoder"); this->decoder_ = make_unique(this); } -#endif // ONLINE_IMAGE_PNG_SUPPORT +#endif // USE_ONLINE_IMAGE_PNG_SUPPORT if (!this->decoder_) { ESP_LOGE(TAG, "Could not instantiate decoder. Image format unsupported: %d", this->format_); @@ -185,7 +185,7 @@ void OnlineImage::update() { this->download_error_callback_.call(); return; } - ESP_LOGI(TAG, "Downloading image (Size: %d)", total_size); + ESP_LOGI(TAG, "Downloading image (Size: %zu)", total_size); this->start_time_ = ::time(nullptr); }