Skip to content

Remove unused globals rejected by Clang 23 - #13759

Merged
bneradt merged 1 commit into
apache:masterfrom
bneradt:fix-clang23-unused-globals
Oct 1, 2026
Merged

bneradt merged 1 commit into
apache:masterfrom
bneradt:fix-clang23-unused-globals

Conversation

@bneradt

@bneradt bneradt commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Moving ATS CI from fedora:44 to fedora:45 brings Clang 23. Its
-Wunused-but-set-global diagnostic flags globals that are assigned but
never read. These warnings fail the Fedora CI build because its CMake
preset treats warnings as errors, blocking the image upgrade.

This patch removes unused counters and pointer assignments while keeping
plugin objects registered with the C++ API. It also removes an unused
continuation allocation from the intercept example.

Removing the unused remap pointer exposes an ownership-tracking
limitation in the existing Clang analyzer. This patch explicitly returns
the remap plugin through its instance handle so the analyzer can see the
transfer to the remap API, which deletes the instance when its rule is
removed.

Co-authored-by: Codex GPT-6.1 Sol High

Copilot AI balanced review requested due to automatic review settings September 30, 2026 21:02
@bneradt bneradt added this to the 11.0.0 milestone Sep 30, 2026
@bneradt bneradt added Plugins Build work related to build configuration or environment Logging Cleanup labels Sep 30, 2026
@bneradt bneradt self-assigned this Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The changes remove only unused state while preserving required framework-managed object lifetimes and hooks.

Review effort: Balanced
Findings: None

@bneradt
bneradt force-pushed the fix-clang23-unused-globals branch from ebe4c3c to ce20374 Compare September 30, 2026 22:38
Copilot AI balanced review requested due to automatic review settings September 30, 2026 22:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@masaori335
masaori335 requested a balanced review from Copilot October 1, 2026 08:50

@masaori335 masaori335 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The changes are narrowly scoped and preserve the required plugin registration and ownership behavior.

Review effort: Balanced
Findings: None

Moving ATS CI from fedora:44 to fedora:45 brings Clang 23. Its
-Wunused-but-set-global diagnostic flags globals that are assigned but
never read. These warnings fail the Fedora CI build because its CMake
preset treats warnings as errors, blocking the image upgrade.

This patch removes unused counters and pointer assignments while keeping
plugin objects registered with the C++ API. It also removes an unused
continuation allocation from the intercept example.

Removing the unused remap pointer exposes an ownership-tracking
limitation in the existing Clang analyzer. This patch explicitly returns
the remap plugin through its instance handle so the analyzer can see the
transfer to the remap API, which deletes the instance when its rule is
removed.

Co-authored-by: Codex GPT-6.1 Sol High
@bneradt
bneradt force-pushed the fix-clang23-unused-globals branch from ce20374 to 93bbca3 Compare October 1, 2026 15:03
@bneradt
bneradt enabled auto-merge (squash) October 1, 2026 18:12
@bneradt
bneradt merged commit 527edda into apache:master Oct 1, 2026
14 checks passed
@bneradt
bneradt deleted the fix-clang23-unused-globals branch October 1, 2026 18:40
@github-project-automation github-project-automation Bot moved this to For v10.2.1 in ATS v10.2.x Oct 1, 2026
cmcfarlen pushed a commit that referenced this pull request Oct 7, 2026
Moving ATS CI from fedora:44 to fedora:45 brings Clang 23. Its
-Wunused-but-set-global diagnostic flags globals that are assigned but
never read. These warnings fail the Fedora CI build because its CMake
preset treats warnings as errors, blocking the image upgrade.

This patch removes unused counters and pointer assignments while keeping
plugin objects registered with the C++ API. It also removes an unused
continuation allocation from the intercept example.

Removing the unused remap pointer exposes an ownership-tracking
limitation in the existing Clang analyzer. This patch explicitly returns
the remap plugin through its instance handle so the analyzer can see the
transfer to the remap API, which deletes the instance when its rule is
removed.

Co-authored-by: Codex GPT-6.1 Sol High
(cherry picked from commit 527edda)
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.1 Oct 7, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to the 10.2.x branch as ad5c06f for the 10.2.1 release.

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

Labels

Build work related to build configuration or environment Cleanup Logging Plugins

Projects

Status: Picked v10.2.1

Development

Successfully merging this pull request may close these issues.

4 participants