WillAyd commented on code in PR #1093:
URL: https://github.com/apache/arrow-adbc/pull/1093#discussion_r1358406811
##########
c/driver/postgresql/postgres_copy_reader.h:
##########
@@ -1455,7 +1455,7 @@ class PostgresCopyStreamWriter {
NANOARROW_OK) {
return ADBC_STATUS_INTERNAL;
}
- PostgresCopyFieldWriter* child_writer;
+ PostgresCopyFieldWriter* child_writer = {};
Review Comment:
I'm not sure why this is required; the reader doesn't need it, but without
this the conda environment compiler was complaining
```
In file included from
/usr/share/miniconda3/envs/test/x86_64-conda-linux-gnu/include/c++/12.3.0/memory:75,
from
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/statement.h:21,
from
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/statement.cc:18:
In constructor 'std::__uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl(pointer)
[with _Tp = adbcpq::PostgresCopyFieldWriter; _Dp =
std::default_delete<adbcpq::PostgresCopyFieldWriter>]',
inlined from 'std::__uniq_ptr_data<adbcpq::PostgresCopyFieldWriter,
std::default_delete<adbcpq::PostgresCopyFieldWriter>, true,
true>::__uniq_ptr_data(std::__uniq_ptr_impl<adbcpq::PostgresCopyFieldWriter,
std::default_delete<adbcpq::PostgresCopyFieldWriter> >::pointer) [inherited
from std::__uniq_ptr_impl<adbcpq::PostgresCopyFieldWriter,
std::default_delete<adbcpq::PostgresCopyFieldWriter> >]' at
/usr/share/miniconda3/envs/test/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/unique_ptr.h:233:40,
inlined from 'std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer) [with _Del
= std::default_delete<adbcpq::PostgresCopyFieldWriter>;
<template-parameter-2-2> = void; _Tp = adbcpq::PostgresCopyFieldWriter; _Dp =
std::default_delete<adbcpq::PostgresCopyFieldWriter>]' at
/usr/share/miniconda3/envs/test/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/unique_ptr.h:310:4,
inlined from 'ArrowErrorCode
adbcpq::PostgresCopyStreamWriter::InitFieldWriters(ArrowError*)' at
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/postgres_copy_reader.h:1460:37,
inlined from 'AdbcStatusCode
adbcpq::{anonymous}::BindStream::ExecuteCopy(PGconn*, int64_t*, AdbcError*)' at
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/statement.cc:554:7,
inlined from 'AdbcStatusCode
adbcpq::PostgresStatement::ExecuteUpdateBulk(int64_t*, AdbcError*)' at
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/statement.cc:1225:3:
/usr/share/miniconda3/envs/test/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/unique_ptr.h:168:56:
error: 'child_writer' may be used uninitialized [-Werror=maybe-uninitialized]
168 | __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; }
| ~~~~~~~~~^~~~~
In file included from
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/statement.h:30:
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/postgres_copy_reader.h:
In member function 'AdbcStatusCode
adbcpq::PostgresStatement::ExecuteUpdateBulk(int64_t*, AdbcError*)':
/home/runner/work/arrow-adbc/arrow-adbc/c/driver/postgresql/postgres_copy_reader.h:1458:32:
note: 'child_writer' was declared here
1458 | PostgresCopyFieldWriter* child_writer;
```
Intereresting enough both the conda version and my system gcc are 12.3.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]