diff --git a/cpp/src/arrow/util/align_util.cc b/cpp/src/arrow/util/align_util.cc index ac2d485af8c9d..ef224ebbd9255 100644 --- a/cpp/src/arrow/util/align_util.cc +++ b/cpp/src/arrow/util/align_util.cc @@ -49,7 +49,7 @@ Type::type GetTypeForBuffers(const ArrayData& array) { if (type_id == Type::DICTIONARY) { // return index type id, provided by the DictionaryType array.type or // array.type->storage_type() if array.type is an ExtensionType - const std::shared_ptr& dict_type = array.type; + std::shared_ptr dict_type = array.type; if (array.type->id() == Type::EXTENSION) { dict_type = checked_pointer_cast(array.type)->storage_type(); }