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
main
Peter Dillinger 3 years ago committed by Facebook GitHub Bot
parent 1ababeb76a
commit 2a3511a0df
  1. 5
      options/options_helper.h

@ -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

Loading…
Cancel
Save