Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warnings #18033

Closed
asfimport opened this issue Jan 30, 2018 · 1 comment
Closed

Compilation warnings #18033

asfimport opened this issue Jan 30, 2018 · 1 comment
Assignees
Milestone

Comments

@asfimport
Copy link
Collaborator

I suppose this may vary depending on the compiler, but I get the following warnings with gcc 4.9:

/home/antoine/arrow/cpp/src/plasma/fling.cc: In function ‘int send_fd(int, int)’:
/home/antoine/arrow/cpp/src/plasma/fling.cc:46:50: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   *reinterpret_cast<int*>(CMSG_DATA(header)) = fd;
                                                  ^
/home/antoine/arrow/cpp/src/arrow/python/io.cc: In member functionvirtual arrow::Status arrow::py::PyReadableFile::Read(int64_t, std::shared_ptr<arrow::Buffer>*)’:
/home/antoine/arrow/cpp/src/arrow/python/io.cc:153:60: warning: ‘bytes_objmay be used uninitialized in this function [-Wmaybe-uninitialized]
   Py_DECREF(bytes_obj);
                                                            ^
/home/antoine/arrow/cpp/src/arrow/python/io.cc: In member functionvirtual arrow::Status arrow::py::PyReadableFile::Read(int64_t, int64_t*, void*)’:
/home/antoine/arrow/cpp/src/arrow/python/io.cc:141:60: warning: ‘bytes_objmay be used uninitialized in this function [-Wmaybe-uninitialized]
   Py_DECREF(bytes_obj);
                                                            ^
/home/antoine/arrow/cpp/src/arrow/python/io.cc: In member functionvirtual arrow::Status arrow::py::PyReadableFile::GetSize(int64_t*)’:
/home/antoine/arrow/cpp/src/arrow/python/io.cc:187:20: warning: ‘file_sizemay be used uninitialized in this function [-Wmaybe-uninitialized]
   *size = file_size;
                    ^
/home/antoine/arrow/cpp/src/arrow/python/io.cc:46:65: warning: ‘current_positionmay be used uninitialized in this function [-Wmaybe-uninitialized]
                              const_cast<char*>(argspec), args...);
                                                                 ^
/home/antoine/arrow/cpp/src/arrow/python/io.cc:175:11: note: ‘current_positionwas declared here
   int64_t current_position;
           ^
/home/antoine/arrow/cpp/src/arrow/ipc/json-internal.cc: In functionarrow::Status arrow::ipc::internal::json::GetField(const Value&, const arrow::ipc::DictionaryMemo*, std::shared_ptr<arrow::Field>*)’:
/home/antoine/arrow/cpp/src/arrow/ipc/json-internal.cc:876:81: warning: ‘dictionary_idmay be used uninitialized in this function [-Wmaybe-uninitialized]
     RETURN_NOT_OK(dictionary_memo->GetDictionary(dictionary_id, &dictionary));
                                                                                 ^
/home/antoine/arrow/cpp/src/arrow/ipc/json-internal.cc: In functionarrow::Status arrow::ipc::internal::json::ReadSchema(const Value&, arrow::MemoryPool*, std::shared_ptr<arrow::Schema>*)’:
/home/antoine/arrow/cpp/src/arrow/ipc/json-internal.cc:1354:80: warning: ‘dictionary_idmay be used uninitialized in this function [-Wmaybe-uninitialized]
     RETURN_NOT_OK(dictionary_memo->AddDictionary(dictionary_id, dictionary));
                                                                                ^
/home/antoine/arrow/cpp/src/arrow/ipc/json-internal.cc:1349:13: note: ‘dictionary_idwas declared here
     int64_t dictionary_id;
             ^
In file included from /home/antoine/arrow/cpp/src/arrow/api.h:25:0,
                 from /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:29:
/home/antoine/arrow/cpp/src/arrow/builder.h: In member functionarrow::Status arrow::py::TimestampConverter::AppendItem(const arrow::py::OwnedRef&)’:
/home/antoine/arrow/cpp/src/arrow/builder.h:284:5: warning: ‘tmay be used uninitialized in this function [-Wmaybe-uninitialized]
     raw_data_[length_++] = val;
     ^
/home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:576:13: note: ‘twas declared here
     int64_t t;
             ^

Reporter: Antoine Pitrou / @pitrou
Assignee: Antoine Pitrou / @pitrou

PRs and other links:

Note: This issue was originally created as ARROW-2054. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Wes McKinney / @wesm:
Issue resolved by pull request 1533
#1533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants