apache / apache/arrow

[C++] Compilation warnings on gcc in release mode

Open
#32,445 1 comment 0 reactions 0 assignees View on GitHub
Component: C++ Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

With gcc 10.3 I get this warning in release mode.

```Java

[168/321] Building CXX object src/arrow/CMakeFiles/arrow_testing_objlib.dir/compute/exec/test_util.cc.o
In file included from /home/antoine/arrow/dev/cpp/src/arrow/compute/exec/test_util.h:28,
from /home/antoine/arrow/dev/cpp/src/arrow/compute/exec/test_util.cc:18:
/home/antoine/arrow/dev/cpp/src/arrow/compute/exec.h: In member function 'R arrow::internal::FnOnce::FnImpl::invoke(A&& ...) [with Fn = arrow::Future<>::WrapResultyOnComplete::Callback::ThenOnComplete >)::, arrow::Future<>::PassthruOnFailure >):: > > >; R = void; A = {const arrow::FutureImpl&}]':
/home/antoine/arrow/dev/cpp/src/arrow/compute/exec.h:177:21: warning: '*((void*)(&)+8).arrow::compute::ExecBatch::length' may be used uninitialized in this function [-Wmaybe-uninitialized]
177 | struct ARROW_EXPORT ExecBatch {
| ^~~~~~~~~
```

**Reporter**: [Antoine Pitrou](https://issues.apache.org/jira/browse/ARROW-17145) / @pitrou

**Note**: *This issue was originally created as [ARROW-17145](https://issues.apache.org/jira/browse/ARROW-17145). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Reproduce the GCC 10.3 release-mode warning from the build of src/arrow/compute/exec/test_util.cc. Start at src/arrow/compute/exec.h around line 177 and trace the reported ExecBatch initialization path. Done means the warning is resolved without introducing new release-build warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.