a few more

This commit is contained in:
J. Nick Koston 2025-07-14 09:50:29 -10:00
parent ee5242ec8d
commit 85351bb952
No known key found for this signature in database
2 changed files with 3 additions and 0 deletions

View File

@ -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()) {

View File

@ -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;
},