You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/09/17 16:30:00 UTC
[jira] [Updated] (ARROW-3251) [C++] Conversion warnings in cast.cc
[ https://issues.apache.org/jira/browse/ARROW-3251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-3251:
----------------------------------
Labels: pull-request-available (was: )
> [C++] Conversion warnings in cast.cc
> ------------------------------------
>
> Key: ARROW-3251
> URL: https://issues.apache.org/jira/browse/ARROW-3251
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Antoine Pitrou
> Assignee: Antoine Pitrou
> Priority: Major
> Labels: pull-request-available
>
> This is with gcc 7.3.0 and {{-Wconversion}}.
> {code}
> ../src/arrow/compute/kernels/cast.cc: In instantiation of ‘void arrow::compute::CastFunctor<O, I, typename std::enable_if<arrow::compute::is_float_truncate<O, I>::value>::type>::operator()(arrow::compute::FunctionContext*, const arrow::compute::CastOptions&, const arrow::ArrayData&, arrow::ArrayData*) [with O = arrow::Int64Type; I = arrow::DoubleType; typename std::enable_if<arrow::compute::is_float_truncate<O, I>::value>::type = void]’:
> ../src/arrow/compute/kernels/cast.cc:1105:1: required from here
> ../src/arrow/compute/kernels/cast.cc:291:45: warning: conversion to ‘in_type {aka double}’ from ‘long int’ may alter its value [-Wconversion]
> if (ARROW_PREDICT_FALSE(out_value != *in_data)) {
> ~~~~~~~~~~^~~~~
> ../src/arrow/util/macros.h:37:50: note: in definition of macro ‘ARROW_PREDICT_FALSE’
> #define ARROW_PREDICT_FALSE(x) (__builtin_expect(x, 0))
> ^
> ../src/arrow/compute/kernels/cast.cc:301:45: warning: conversion to ‘in_type {aka double}’ from ‘long int’ may alter its value [-Wconversion]
> if (ARROW_PREDICT_FALSE(out_value != *in_data)) {
> ~~~~~~~~~~^~~~~
> ../src/arrow/util/macros.h:37:50: note: in definition of macro ‘ARROW_PREDICT_FALSE’
> #define ARROW_PREDICT_FALSE(x) (__builtin_expect(x, 0))
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)