Skip to content

Encapsulate network.cpp's own runtime state as static, not global - #5786

Open
netmindz wants to merge 1 commit into
wled:mainfrom
netmindz:refactor/networkcpp-globals
Open

Encapsulate network.cpp's own runtime state as static, not global#5786
netmindz wants to merge 1 commit into
wled:mainfrom
netmindz:refactor/networkcpp-globals

Conversation

@netmindz

@netmindz netmindz commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Part of an ongoing pass identifying WLED_GLOBAL declarations that are actually only referenced in one file (see #5777-#5785 for earlier ones). apClients turned out to be private to network.cpp.

Converted it to file-local static, same type and initial value as before.

No behavior change — purely a storage-class change.

Test plan

  • esp32dev: builds and links cleanly via pio run -e esp32dev, no warnings.
  • Confirmed via repo-wide grep (wled00/, usermods/) that apClients is not referenced outside network.cpp.

🤖 Generated with Claude Code

apClients was referenced only in network.cpp. Converted it to
file-local `static`.

No behavior change - purely a storage-class change.

Verified: esp32dev builds and links cleanly via `pio run -e esp32dev`,
no warnings from either changed file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@netmindz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ba544d32-edd9-4587-bed7-cff3bcbaf5e0

📥 Commits

Reviewing files that changed from the base of the PR and between 0869ef4 and 282737d.

📒 Files selected for processing (2)
  • wled00/network.cpp
  • wled00/wled.h

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants