Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: [C++] Fix a maybe-uninitialized warning (apache#38433)
Some compilers generate a maybe-uninitialized warning when compiling scalar_round.cc ``` /home/jinshang/arrow/cpp/src/arrow/util/logging.h: In function 'void arrow::compute::internal::RegisterScalarRoundArithmetic(arrow::compute::FunctionRegistry*)': /home/jinshang/arrow/cpp/src/arrow/util/logging.h:59:34: warning: 'exec' may be used uninitialized [-Wmaybe-uninitialized] 59 | #define ARROW_IGNORE_EXPR(expr) ((void)(expr)) | ^ /home/jinshang/arrow/cpp/src/arrow/compute/kernels/scalar_round.cc:1262:23: note: 'exec' was declared here 1262 | ArrayKernelExec exec; | ^~~~ /home/jinshang/arrow/cpp/src/arrow/util/logging.h:59:34: warning: 'exec' may be used uninitialized [-Wmaybe-uninitialized] 59 | #define ARROW_IGNORE_EXPR(expr) ((void)(expr)) | ^ /home/jinshang/arrow/cpp/src/arrow/compute/kernels/scalar_round.cc:1283:23: note: 'exec' was declared here 1283 | ArrayKernelExec exec; | ^~~~ ``` Authored-by: Jin Shang <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
- Loading branch information