Skip to content

Commit

Permalink
Address a couple more infer warnings
Browse files Browse the repository at this point in the history
Change-Id: Ib30ff3d4784983342eca31405b8916dd4474be03
  • Loading branch information
wesm committed Oct 1, 2017
1 parent 75131a6 commit 22c5d36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cpp/src/arrow/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct Decimal;
/// input array and replace them with newly-allocated data, changing the output
/// data type as well.
struct ARROW_EXPORT ArrayData {
ArrayData() {}
ArrayData() : length(0) {}

ArrayData(const std::shared_ptr<DataType>& type, int64_t length,
int64_t null_count = kUnknownNullCount, int64_t offset = 0)
Expand Down
1 change: 0 additions & 1 deletion cpp/src/arrow/ipc/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ Status ReadDictionary(const Buffer& metadata, const DictionaryTypeMap& dictionar
reinterpret_cast<const flatbuf::RecordBatch*>(dictionary_batch->data());
RETURN_NOT_OK(
ReadRecordBatch(batch_meta, dummy_schema, kMaxNestingDepth, file, &batch));

if (batch->num_columns() != 1) {
return Status::Invalid("Dictionary record batch must only contain one field");
}
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/arrow/python/numpy_to_arrow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,9 @@ Status NdarrayToArrow(MemoryPool* pool, PyObject* ao, PyObject* mo,
std::shared_ptr<ChunkedArray>* out) {
NumPyConverter converter(pool, ao, mo, type, use_pandas_null_sentinels);
RETURN_NOT_OK(converter.Convert());
DCHECK(converter.result()[0]);
*out = std::make_shared<ChunkedArray>(converter.result());
const auto& output_arrays = converter.result();
DCHECK_GT(output_arrays.size(), 0);
*out = std::make_shared<ChunkedArray>(output_arrays);
return Status::OK();
}

Expand Down

0 comments on commit 22c5d36

Please sign in to comment.