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/01/25 00:13:00 UTC

[jira] [Commented] (ARROW-2010) [C++] Compiler warnings with CHECKIN warning level in ORC adapter

    [ https://issues.apache.org/jira/browse/ARROW-2010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338462#comment-16338462 ] 

ASF GitHub Bot commented on ARROW-2010:
---------------------------------------

wesm opened a new pull request #1506: ARROW-2010: [C++] Do not suppress shorten-64-to-32 warnings from clang, fix warnings in ORC adapter
URL: https://github.com/apache/arrow/pull/1506
 
 
   These are warnings we want to see to prevent silent truncation of values without an explicit cast. 
   
   See also bug ARROW-2032 that I encountered while working on this

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> [C++] Compiler warnings with CHECKIN warning level in ORC adapter
> -----------------------------------------------------------------
>
>                 Key: ARROW-2010
>                 URL: https://issues.apache.org/jira/browse/ARROW-2010
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Wes McKinney
>            Assignee: Wes McKinney
>            Priority: Major
>              Labels: ORC, pull-request-available
>             Fix For: 0.9.0
>
>
> I am encountering this locally with clang 4.0 and BUILD_WARNING_LEVEL=CHECKIN. We should investigate why these aren't showing up in our CI builds
> {code}
> ../src/arrow/adapters/orc/adapter.cc:138:38: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'int32_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
>       *out = fixed_size_binary(type->getMaximumLength());
>              ~~~~~~~~~~~~~~~~~ ~~~~~~^~~~~~~~~~~~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:151:30: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'int32_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
>         *out = decimal(type->getPrecision(), type->getScale());
>                ~~~~~~~ ~~~~~~^~~~~~~~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:151:52: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'int32_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
>         *out = decimal(type->getPrecision(), type->getScale());
>                ~~~~~~~                       ~~~~~~^~~~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:176:24: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
>       int size = type->getSubtypeCount();
>           ~~~~   ~~~~~~^~~~~~~~~~~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:188:24: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
>       int size = type->getSubtypeCount();
>           ~~~~   ~~~~~~^~~~~~~~~~~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:262:21: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
>     int size = type.getSubtypeCount();
>         ~~~~   ~~~~~^~~~~~~~~~~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:452:18: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     for (int i = offset; i < length + offset; i++) {
>              ~   ^~~~~~
> ../src/arrow/adapters/orc/adapter.cc:477:18: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     for (int i = offset; i < length + offset; i++) {
>              ~   ^~~~~~
> ../src/arrow/adapters/orc/adapter.cc:543:26: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     int start = builder->length();
>         ~~~~~   ~~~~~~~~~^~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:572:26: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     int start = builder->length();
>         ~~~~~   ~~~~~~~~~^~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:599:18: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     for (int i = offset; i < length + offset; i++) {
>              ~   ^~~~~~
> ../src/arrow/adapters/orc/adapter.cc:615:18: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     for (int i = offset; i < length + offset; i++) {
>              ~   ^~~~~~
> ../src/arrow/adapters/orc/adapter.cc:632:20: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>       for (int i = offset; i < length + offset; i++) {
>                ~   ^~~~~~
> ../src/arrow/adapters/orc/adapter.cc:642:20: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>       for (int i = offset; i < length + offset; i++) {
>                ~   ^~~~~~
> ../src/arrow/adapters/orc/adapter.cc:519:26: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     int start = builder->length();
>         ~~~~~   ~~~~~~~~~^~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:389:16: note: in instantiation of function template specialization 'arrow::adapters::orc::ORCFileReader::Impl::AppendNumericBatchCast<arrow::NumericBuilder<arrow::Int32Type>, int, orc::LongVectorBatch, long>' requested here
>         return AppendNumericBatchCast<Int32Builder, int32_t, liborc::LongVectorBatch,
>                ^
> ../src/arrow/adapters/orc/adapter.cc:519:26: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     int start = builder->length();
>         ~~~~~   ~~~~~~~~~^~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:392:16: note: in instantiation of function template specialization 'arrow::adapters::orc::ORCFileReader::Impl::AppendNumericBatchCast<arrow::NumericBuilder<arrow::Int16Type>, short, orc::LongVectorBatch, long>' requested here
>         return AppendNumericBatchCast<Int16Builder, int16_t, liborc::LongVectorBatch,
>                ^
> ../src/arrow/adapters/orc/adapter.cc:519:26: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     int start = builder->length();
>         ~~~~~   ~~~~~~~~~^~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:395:16: note: in instantiation of function template specialization 'arrow::adapters::orc::ORCFileReader::Impl::AppendNumericBatchCast<arrow::NumericBuilder<arrow::Int8Type>, signed char, orc::LongVectorBatch, long>' requested here
>         return AppendNumericBatchCast<Int8Builder, int8_t, liborc::LongVectorBatch,
>                ^
> ../src/arrow/adapters/orc/adapter.cc:519:26: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     int start = builder->length();
>         ~~~~~   ~~~~~~~~~^~~~~~~~
> ../src/arrow/adapters/orc/adapter.cc:401:16: note: in instantiation of function template specialization 'arrow::adapters::orc::ORCFileReader::Impl::AppendNumericBatchCast<arrow::NumericBuilder<arrow::FloatType>, float, orc::DoubleVectorBatch, double>' requested here
>         return AppendNumericBatchCast<FloatBuilder, float, liborc::DoubleVectorBatch,
>                ^
> ../src/arrow/adapters/orc/adapter.cc:599:18: error: implicit conversion loses integer precision: 'int64_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
>     for (int i = offset; i < length + offset; i++) {
>              ~   ^~~~~~
> ../src/arrow/adapters/orc/adapter.cc:407:16: note: in instantiation of function template specialization 'arrow::adapters::orc::ORCFileReader::Impl::AppendBinaryBatch<arrow::StringBuilder>' requested here
>         return AppendBinaryBatch<StringBuilder>(batch, offset, length, builder);
>                ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 20 errors generated.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)