Skip to content

Commit f2471c8

Browse files
committed
Suppress GCC warnings for WriteProperties
1 parent 59f79c1 commit f2471c8

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

cpp/src/arrow/ipc/feather.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,9 @@ Result<std::shared_ptr<Reader>> Reader::Open(
805805
}
806806
}
807807

808+
// GCC warns about the deprecated type in these definitions, Clang doesn't
809+
ARROW_SUPPRESS_DEPRECATION_WARNING
810+
808811
WriteProperties WriteProperties::Defaults() {
809812
WriteProperties result;
810813
#ifdef ARROW_WITH_LZ4
@@ -834,6 +837,8 @@ Status WriteTable(const Table& table, io::OutputStream* dst,
834837
}
835838
}
836839

840+
ARROW_UNSUPPRESS_DEPRECATION_WARNING
841+
837842
} // namespace feather
838843
} // namespace ipc
839844
} // namespace arrow

cpp/src/arrow/ipc/feather.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,15 @@ struct ARROW_DEPRECATED("Deprecated in 26.0.0. Use arrow::ipc::MakeFileWriter in
152152
int compression_level = ::arrow::util::kUseDefaultCompressionLevel;
153153
};
154154

155+
// Only suppresses the deprecated WriteProperties in the default argument
156+
ARROW_SUPPRESS_DEPRECATION_WARNING
155157
/// \deprecated Deprecated in 26.0.0. Feather V2 is the Arrow IPC file format;
156158
/// use arrow::ipc::MakeFileWriter instead.
157159
ARROW_DEPRECATED("Deprecated in 26.0.0. Use arrow::ipc::MakeFileWriter instead.")
158160
ARROW_EXPORT
159161
Status WriteTable(const Table& table, io::OutputStream* dst,
160162
const WriteProperties& properties = WriteProperties::Defaults());
163+
ARROW_UNSUPPRESS_DEPRECATION_WARNING
161164

162165
} // namespace feather
163166
} // namespace ipc

0 commit comments

Comments
 (0)