[
https://issues.apache.org/jira/browse/ARROW-9738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yibo Cai closed ARROW-9738.
---------------------------
Resolution: Duplicate
> [C++] Many compile warnings from gcc
> ------------------------------------
>
> Key: ARROW-9738
> URL: https://issues.apache.org/jira/browse/ARROW-9738
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Yibo Cai
> Priority: Major
>
> There are many "maybe-uninitialized" warnings when build arrow with gcc-7.5,
> on ubuntu 18.04.
> Most messages are from same file, see below log
> {code:cpp}
> [176/391] Building CXX object
> src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_arithmetic.cc.o
>
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc: In function
> ‘arrow::compute::internal::{anonymous}::enable_if_integer<T>
> arrow::compute::internal::{anonymous}::AddChecked::Call(arrow::compute::
> KernelContext*, Arg0, Arg1) [with T = long int; Arg0 = long int; Arg1 = long
> int]’:
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc:87:12: warning: ‘result’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> return result;
>
>
> ^~~~~~
>
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc: In function
> ‘arrow::compute::internal::{anonymous}::enable_if_integer<T>
> arrow::compute::internal::{anonymous}::AddChecked::Call(arrow::compute::
> KernelContext*, Arg0, Arg1) [with T = int; Arg0 = int; Arg1 = int]’:
>
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc:87:12: warning: ‘result’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> return result;
>
>
> ^~~~~~
>
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc: In function
> ‘arrow::compute::internal::{anonymous}::enable_if_integer<T>
> arrow::compute::internal::{anonymous}::SubtractChecked::Call(arrow::comp
> ute::KernelContext*, Arg0, Arg1) [with T = long int; Arg0 = long int; Arg1 =
> long int]’:
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc:122:12: warning: ‘result’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> return result;
>
>
> ^~~~~~
>
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc: In function
> ‘arrow::compute::internal::{anonymous}::enable_if_integer<T>
> arrow::compute::internal::{anonymous}::SubtractChecked::Call(arrow::comp
> ute::KernelContext*, Arg0, Arg1) [with T = int; Arg0 = int; Arg1 = int]’:
>
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc:122:12: warning: ‘result’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> return result;
>
>
> ^~~~~~
>
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc: In function
> ‘arrow::compute::internal::{anonymous}::enable_if_integer<T>
> arrow::compute::internal::{anonymous}::MultiplyChecked::Call(arrow::comp
> ute::KernelContext*, Arg0, Arg1) [with T = long int; Arg0 = long int; Arg1 =
> long int]’:
>
> ../src/arrow/compute/kernels/scalar_arithmetic.cc:179:12: warning: ‘result’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> return result;
>
>
> ^~~~~~
> ......
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)