From 85351bb95242959eb70db232a6900459ed9f5833 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 14 Jul 2025 09:50:29 -1000 Subject: [PATCH] a few more --- esphome/components/json/json_util.cpp | 2 ++ esphome/components/mqtt/mqtt_component.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/esphome/components/json/json_util.cpp b/esphome/components/json/json_util.cpp index e82a5db2e3..d92a7a9794 100644 --- a/esphome/components/json/json_util.cpp +++ b/esphome/components/json/json_util.cpp @@ -26,6 +26,7 @@ struct SpiRamAllocator : ArduinoJson::Allocator { }; std::string build_json(const json_build_t &f) { + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson auto doc_allocator = SpiRamAllocator(); JsonDocument json_document(&doc_allocator); if (json_document.overflowed()) { @@ -45,6 +46,7 @@ std::string build_json(const json_build_t &f) { } bool parse_json(const std::string &data, const json_parse_t &f) { + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson auto doc_allocator = SpiRamAllocator(); JsonDocument json_document(&doc_allocator); if (json_document.overflowed()) { diff --git a/esphome/components/mqtt/mqtt_component.cpp b/esphome/components/mqtt/mqtt_component.cpp index 685c0e6c6c..5f00bfddf6 100644 --- a/esphome/components/mqtt/mqtt_component.cpp +++ b/esphome/components/mqtt/mqtt_component.cpp @@ -189,6 +189,7 @@ bool MQTTComponent::send_discovery_() { device_info[MQTT_DEVICE_SUGGESTED_AREA] = node_area; } + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson device_info[MQTT_DEVICE_CONNECTIONS][0][0] = "mac"; device_info[MQTT_DEVICE_CONNECTIONS][0][1] = mac; },