Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2054

Compilation warnings

    XMLWordPrintableJSON

Details

    Description

      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 function ‘virtual 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_obj’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         Py_DECREF(bytes_obj);
                                                                  ^
      /home/antoine/arrow/cpp/src/arrow/python/io.cc: In member function ‘virtual arrow::Status arrow::py::PyReadableFile::Read(int64_t, int64_t*, void*)’:
      /home/antoine/arrow/cpp/src/arrow/python/io.cc:141:60: warning: ‘bytes_obj’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         Py_DECREF(bytes_obj);
                                                                  ^
      /home/antoine/arrow/cpp/src/arrow/python/io.cc: In member function ‘virtual arrow::Status arrow::py::PyReadableFile::GetSize(int64_t*)’:
      /home/antoine/arrow/cpp/src/arrow/python/io.cc:187:20: warning: ‘file_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         *size = file_size;
                          ^
      /home/antoine/arrow/cpp/src/arrow/python/io.cc:46:65: warning: ‘current_position’ may 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_position’ was declared here
         int64_t current_position;
                 ^
      /home/antoine/arrow/cpp/src/arrow/ipc/json-internal.cc: In function ‘arrow::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_id’ may 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 function ‘arrow::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_id’ may 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_id’ was 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 function ‘arrow::Status arrow::py::TimestampConverter::AppendItem(const arrow::py::OwnedRef&)’:
      /home/antoine/arrow/cpp/src/arrow/builder.h:284:5: warning: ‘t’ may 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: ‘t’ was declared here
           int64_t t;
                   ^
      
      

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: