I opened https://issues.apache.org/jira/browse/ARROW-13469

On Tue, Jul 27, 2021 at 3:17 PM Rares Vernica <rvern...@gmail.com> wrote:
>
> Thanks, Wes. I did something like this to repress the warnings for now:
>
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
> #include <arrow/builder.h>
> #pragma GCC diagnostic pop
>
> Cheers,
> Rares
>
> On Tue, Jul 27, 2021 at 8:18 PM Wes McKinney <wesmck...@gmail.com> wrote:
>
> > Seems like this could be fixed by adding default values:
> >
> > struct DayMilliseconds {
> >   int32_t days = 0;
> >   int32_t milliseconds = 0;
> >   ...
> > };
> >
> > In the meantime, you would have to suppress the warning in the
> > compiler where it's happening
> >
> > On Tue, Jul 27, 2021 at 12:26 PM Rares Vernica <rvern...@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > > I'm getting a handful of warnings when including arrow/builder.h Is this
> > > expected? Should I use the suggested -W flag?
> > >
> > > In file included from
> > > /opt/apache-arrow/include/arrow/array/builder_dict.h:29:0,
> > >                  from /opt/apache-arrow/include/arrow/builder.h:26,
> > >
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h: In
> > instantiation
> > > of 'arrow::Status arrow::NumericBuilder<TypeClass>::AppendNull() [with T
> > =
> > > arrow::DayTimeIntervalType]':
> > > XArray.cpp:658:1:   required from here
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:102:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::days'
> > > [-Wmissing-field-initializers]
> > >      data_builder_.UnsafeAppend(value_type{});  // zero
> > >      ^
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:102:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::milliseconds'
> > > [-Wmissing-field-initializers]
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h: In
> > instantiation
> > > of 'arrow::Status arrow::NumericBuilder<TypeClass>::AppendNulls(int64_t)
> > > [with T = arrow::DayTimeIntervalType; int64_t = long int]':
> > > XArray.cpp:658:1:   required from here
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:94:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::days'
> > > [-Wmissing-field-initializers]
> > >      data_builder_.UnsafeAppend(length, value_type{});  // zero
> > >      ^
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:94:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::milliseconds'
> > > [-Wmissing-field-initializers]
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h: In
> > instantiation
> > > of 'arrow::Status arrow::NumericBuilder<TypeClass>::AppendEmptyValue()
> > > [with T = arrow::DayTimeIntervalType]':
> > > XArray.cpp:658:1:   required from here
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:110:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::days'
> > > [-Wmissing-field-initializers]
> > >      data_builder_.UnsafeAppend(value_type{});  // zero
> > >      ^
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:110:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::milliseconds'
> > > [-Wmissing-field-initializers]
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h: In
> > instantiation
> > > of 'arrow::Status
> > > arrow::NumericBuilder<TypeClass>::AppendEmptyValues(int64_t) [with T =
> > > arrow::DayTimeIntervalType; int64_t = long int]':
> > >
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:118:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::days'
> > > [-Wmissing-field-initializers]
> > >      data_builder_.UnsafeAppend(length, value_type{});  // zero
> > >      ^
> > > /opt/apache-arrow/include/arrow/array/builder_primitive.h:118:5: warning:
> > > missing initializer for member
> > > 'arrow::DayTimeIntervalType::DayMilliseconds::milliseconds'
> > > [-Wmissing-field-initializers]
> > >
> > > Thanks!
> > > Rares
> >

Reply via email to