From d807f93c66b334033806c10941727abe5d6a5133 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 11 Jan 2026 18:27:05 -1000 Subject: [PATCH] cleanup --- esphome/core/helpers.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index dee192cf61..95bfe3bdab 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -871,13 +871,19 @@ template::value, int> = 0> ESPDEPRECATED("Allocates heap memory. Use format_hex_to() with stack buffer. Removed in 2026.7.0.", "2026.1.0") std::string format_hex(T val) { val = convert_big_endian(val); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" return format_hex(reinterpret_cast(&val), sizeof(T)); +#pragma GCC diagnostic pop } /// @deprecated Allocates heap memory. Use format_hex_to() with a stack buffer instead. Removed in 2026.7.0. template ESPDEPRECATED("Allocates heap memory. Use format_hex_to() with stack buffer. Removed in 2026.7.0.", "2026.1.0") std::string format_hex(const std::array &data) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" return format_hex(data.data(), data.size()); +#pragma GCC diagnostic pop } /** Format a byte array in pretty-printed, human-readable hex format.