I get the following error building Arrow C++ with gcc 16.2.1 on x86_64 Fedora Linux 44, using the ninja-debug-python CMake preset:
/home/adam/dev/arrow/cpp/src/arrow/acero/test_util_internal.cc: In constructor ‘arrow::acero::{anonymous}::DummyNode::DummyNode(arrow::acero::ExecPlan*, arrow::acero::ExecNode::NodeVector, bool, arrow::acero::StartProducingFunc, arrow::acero::StopProducingFunc)’:
/home/adam/dev/arrow/cpp/src/arrow/acero/test_util_internal.cc:79:57: error: ‘<unknown>’ may be used uninitialized [-Werror=maybe-uninitialized]
79 | : ExecNode(plan, std::move(inputs), {}, (is_sink) ? nullptr : dummy_schema()),
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/adam/dev/arrow/cpp/src/arrow/acero/test_util_internal.cc:124:27: note: by argument 1 of type ‘const arrow::acero::{anonymous}::DummyNode*’ to ‘std::shared_ptr<arrow::Schema> arrow::acero::{anonymous}::DummyNode::dummy_schema() const’ declared here
124 | std::shared_ptr<Schema> dummy_schema() const {
| ^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
dummy_schema() is a method of DummyNode but the DummyNode instance is not yet initialized when this is called.
I get the following error building Arrow C++ with gcc 16.2.1 on x86_64 Fedora Linux 44, using the
ninja-debug-pythonCMake preset:dummy_schema()is a method ofDummyNodebut theDummyNodeinstance is not yet initialized when this is called.