提交 2a3511a0 编写于 作者: P Peter Dillinger 提交者: Facebook GitHub Bot

Fix -Werror=type-limits seen in Travis (#9128)

Summary:
Work around annoying compiler warning-as-error from https://github.com/facebook/rocksdb/issues/9113

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9128

Test Plan: CI

Reviewed By: jay-zhuang

Differential Revision: D32181499

Pulled By: pdillinger

fbshipit-source-id: d7e5f7857a29f7ba47c49c3aee7150b5763b65d9
上级 1ababeb7
......@@ -31,7 +31,10 @@ std::vector<CompressionType> GetSupportedDictCompressions();
std::vector<ChecksumType> GetSupportedChecksums();
inline bool IsSupportedChecksumType(ChecksumType type) {
return type >= kNoChecksum && type <= kXXH3;
// Avoid annoying compiler warning-as-error (-Werror=type-limits)
auto min = kNoChecksum;
auto max = kXXH3;
return type >= min && type <= max;
}
// Checks that the combination of DBOptions and ColumnFamilyOptions are valid
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册