This is an automated email from the ASF dual-hosted git repository.

adamreeve pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new af8f6b428e6 GH-51278: [C++] Fix build error in acero tests with gcc 16 
(#51279)
af8f6b428e6 is described below

commit af8f6b428e6874aea5633f61d43911803a0f53a1
Author: Adam Reeve <[email protected]>
AuthorDate: Thu Sep 10 22:17:42 2026 +1200

    GH-51278: [C++] Fix build error in acero tests with gcc 16 (#51279)
    
    ### 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
    
    * GitHub Issue: #51278
    
    Authored-by: Adam Reeve <[email protected]>
    Signed-off-by: Adam Reeve <[email protected]>
---
 cpp/src/arrow/acero/test_util_internal.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpp/src/arrow/acero/test_util_internal.cc 
b/cpp/src/arrow/acero/test_util_internal.cc
index 3e279175810..5e3b582efc7 100644
--- a/cpp/src/arrow/acero/test_util_internal.cc
+++ b/cpp/src/arrow/acero/test_util_internal.cc
@@ -121,7 +121,7 @@ struct DummyNode : ExecNode {
  private:
   void AssertIsOutput(ExecNode* output) { ASSERT_EQ(output->output(), 
nullptr); }
 
-  std::shared_ptr<Schema> dummy_schema() const {
+  static std::shared_ptr<Schema> dummy_schema() {
     return schema({field("dummy", null())});
   }
 

Reply via email to