diff --git a/options/options_helper.h b/options/options_helper.h index ec84c467fa2a4f6c99f462ea82e835f6393ed2f2..4ba5d3a941bda6e72d6674f79442522c2b5e8e29 100644 --- a/options/options_helper.h +++ b/options/options_helper.h @@ -31,7 +31,10 @@ std::vector GetSupportedDictCompressions(); std::vector 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