apache / arrow

Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
https://arrow.apache.org/
Apache License 2.0
14.63k stars 3.56k forks source link

GH-44788: [C++] Fix a couple of maybe-uninitialized warnings #44789

Closed raulcd closed 4 hours ago

raulcd commented 2 days ago

Rationale for this change

I was getting some -Wmaybe-uninitialized warnings locally when building, see original issue for log.

What changes are included in this PR?

A couple of minor changes to avoid the warnings, initializing a variable and removing an unnecessary one.

Are these changes tested?

Code will be tested via CI and I can confirm I can compile without warnings now:

$ cmake --build arrow/cpp/build --target install -- -j 8
[411/412] Install the project...
-- Install configuration: "RELEASE"

Are there any user-facing changes?

No

github-actions[bot] commented 2 days ago

:warning: GitHub issue #44788 has been automatically assigned in GitHub to PR creator.

pitrou commented 1 day ago

@raulcd Unrelated to this PR, but you probably want to compile in Debug mode when developing Arrow C++.

raulcd commented 15 hours ago

@raulcd Unrelated to this PR, but you probably want to compile in Debug mode when developing Arrow C++.

Thanks for sharing! I really thought I was using the ninja-debug-python preset but it seems I forgot to update when copy&pasting the documentation from which defaults to ninja-release-python: https://github.com/apache/arrow/blob/27bbd593625122a4a25d9471c8aaf5df54a6dcf9/docs/source/developers/python.rst?plain=1#L305-L307 Maybe we should default the commands to build on debug on the development docs and mention that it can be changed to release instead of the current?

pitrou commented 15 hours ago

Maybe we should default the commands to build on debug on the development docs and mention that it can be changed to release instead of the current?

Ah, probably indeed.