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

Francois Saint-Jacques commented on ARROW-3888:
-----------------------------------------------

I'm also using gcc-7.3 and don't get the full list of errors you see.

> [C++] Compilation warnings with gcc 7.3.0
> -----------------------------------------
>
>                 Key: ARROW-3888
>                 URL: https://issues.apache.org/jira/browse/ARROW-3888
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 0.11.1
>            Reporter: Antoine Pitrou
>            Priority: Minor
>
> I sometimes get these warnings in release mode:
> {code}
> [27/161] Building CXX object 
> src/arrow/CMakeFiles/arrow_objlib.dir/csv/converter.cc.o
> In file included from ../src/arrow/csv/converter.cc:24:0:
> ../src/arrow/builder.h: In member function 'virtual arrow::Status 
> arrow::csv::{anonymous}::TimestampConverter::Convert(const 
> arrow::csv::BlockParser&, int32_t, std::shared_ptr<arrow::Array>*)':
> ../src/arrow/builder.h:395:5: warning: 'value' may be used uninitialized in 
> this function [-Wmaybe-uninitialized]
>      raw_data_[length_++] = val;
>      ^~~~~~~~~
> ../src/arrow/csv/converter.cc:347:18: note: 'value' was declared here
>        value_type value;
>                   ^~~~~
> [93/161] Building CXX object 
> src/parquet/CMakeFiles/parquet_objlib.dir/arrow/writer.cc.o
> In file included from ../src/parquet/arrow/writer.cc:18:0:
> ../src/parquet/arrow/writer.h: In function 
> 'std::shared_ptr<parquet::arrow::ArrowWriterProperties> 
> parquet::arrow::default_arrow_writer_properties()':
> ../src/parquet/arrow/writer.h:82:40: warning: 
> '<anonymous>.parquet::arrow::ArrowWriterProperties::Builder::coerce_timestamps_unit_'
>  may be used uninitialized in this function [-Wmaybe-uninitialized]
>            truncated_timestamps_allowed_));
>                                         ^
> ../src/parquet/arrow/writer.cc: In member function 'arrow::Status 
> parquet::arrow::{anonymous}::ArrowColumnWriter::Write(const arrow::Array&)':
> ../src/parquet/arrow/writer.cc:278:56: warning: 'num_levels' may be used 
> uninitialized in this function [-Wmaybe-uninitialized]
>      RETURN_NOT_OK(this->data_buffer->Resize(num_values * sizeof(T), false));
>                                                         ^
> ../src/parquet/arrow/writer.cc:869:11: note: 'num_levels' was declared here
>    int64_t num_levels;
>            ^~~~~~~~~~
> [94/161] Building CXX object 
> src/parquet/CMakeFiles/parquet_objlib.dir/arrow/reader.cc.o
> ../src/parquet/arrow/reader.cc: In function 'int64_t 
> parquet::arrow::impala_timestamp_to_nanoseconds(const parquet::Int96&)':
> ../src/parquet/arrow/reader.cc:79:86: warning: dereferencing type-punned 
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
>    int64_t nanoseconds = *(reinterpret_cast<const 
> int64_t*>(&(impala_timestamp.value)));
>                                                                               
>         ^
> {code}



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

Reply via email to