mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
[web_server_idf] Add NOLINT at call site for cross-function analyzer path
The function-level NOLINTBEGIN/NOLINTEND on start_session_main_loop_() only covers bug paths whose primary or note locations fall inside that function. clang-analyzer now traces the leak through the caller chain (AsyncEventSource::loop -> adopt_pending_sessions_main_loop_ -> start_session_main_loop_ -> ArduinoJson), with notes at lines 497/498 and 530/537 that sit outside the wrapped range. Add a NOLINTNEXTLINE at the call site in adopt_pending_sessions_main_loop_ so the caller's bug-path location is covered too.
This commit is contained in:
@@ -534,6 +534,7 @@ void AsyncEventSource::adopt_pending_sessions_main_loop_() {
|
||||
this->sessions_.push_back(rsp);
|
||||
// Prime first so on_connect_ observes a session that has already sent its
|
||||
// initial ping/config/sorting_groups, matching the pre-refactor ordering.
|
||||
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson
|
||||
rsp->start_session_main_loop_();
|
||||
if (this->on_connect_) {
|
||||
this->on_connect_(rsp);
|
||||
|
||||
Reference in New Issue
Block a user