Skip to content

GH-51278: [C++] Fix build error in acero tests with gcc 16 - #51279

Merged
adamreeve merged 1 commit into
apache:mainfrom
adamreeve:gcc-16-build-fix
Sep 10, 2026
Merged

GH-51278: [C++] Fix build error in acero tests with gcc 16#51279
adamreeve merged 1 commit into
apache:mainfrom
adamreeve:gcc-16-build-fix

Conversation

@adamreeve

@adamreeve adamreeve commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Fixes a "may be used uninitialized" build error encountered with gcc 16.2.1 (see #51278)

What changes are included in this PR?

Change a test method to static.

Are these changes tested?

Yes, I've built and run the acero tests.

Are there any user-facing changes?

No

@adamreeve
adamreeve requested a review from pitrou as a code owner September 10, 2026 08:55
Copilot AI lite review requested due to automatic review settings September 10, 2026 08:55
@github-actions github-actions Bot added the awaiting review Awaiting review label Sep 10, 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.

🟢 Approval recommended

The change directly addresses the reported GCC 16 warning by eliminating an unsafe member call during construction, with no apparent behavioral impact beyond that fix.

Pull request overview

Fixes a GCC 16 -Wmaybe-uninitialized warning/error in Acero test utilities by removing a call to a non-static member function during base-class construction of DummyNode.

Changes:

  • Make DummyNode::dummy_schema() a static function so it can be safely used in the ExecNode base-class initializer.
File summaries
File Description
cpp/src/arrow/acero/test_util_internal.cc Makes dummy_schema() static to avoid calling an instance method before DummyNode is fully constructed.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Sep 10, 2026

@zanmato1984 zanmato1984 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.

+1

Thanks for fixing this.

@adamreeve
adamreeve merged commit af8f6b4 into apache:main Sep 10, 2026
57 of 61 checks passed
@adamreeve adamreeve removed the awaiting committer review Awaiting committer review label Sep 10, 2026
@adamreeve
adamreeve deleted the gcc-16-build-fix branch September 10, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants