diff --git a/cpp/src/arrow/python/pandas_convert.cc b/cpp/src/arrow/python/pandas_convert.cc index 6b0e3429081..654c3921e8b 100644 --- a/cpp/src/arrow/python/pandas_convert.cc +++ b/cpp/src/arrow/python/pandas_convert.cc @@ -1310,7 +1310,6 @@ inline Status ConvertNulls(const ChunkedArray& data, PyObject** out_values) { for (int c = 0; c < data.num_chunks(); c++) { std::shared_ptr arr = data.chunk(c); - const bool has_nulls = data.null_count() > 0; for (int64_t i = 0; i < arr->length(); ++i) { // All values are null Py_INCREF(Py_None);