You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2019/10/17 14:00:02 UTC
[jira] [Created] (ARROW-6913) [R] Potential bug in compute.cc
Antoine Pitrou created ARROW-6913:
-------------------------------------
Summary: [R] Potential bug in compute.cc
Key: ARROW-6913
URL: https://issues.apache.org/jira/browse/ARROW-6913
Project: Apache Arrow
Issue Type: Bug
Components: R
Reporter: Antoine Pitrou
Just spotted this compiler warning which looks like a real issue:
{code}
compute.cpp: In function 'std::shared_ptr<arrow::ChunkedArray> ChunkedArray__Take(const std::shared_ptr<arrow::ChunkedArray>&, Rcpp::IntegerVector&)':
compute.cpp:141:15: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if (min_i >= offset & max_i < offset + len) {
~~~~~~^~~~~~~~~
{code}
In C++ the "&" operator has a lower priority than comparisons. You probably want to use the "&&" operator instead.
cc [~romainfrancois] [~npr]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)