fix clang-check warnings

This commit is contained in:
MihailRis
2025-01-01 16:06:44 +03:00
parent 4c23dc6adf
commit 17dcbe98ab
8 changed files with 8 additions and 12 deletions
+2 -2
View File
@@ -95,8 +95,8 @@ static inline FieldIncapatibilityType checkIncapatibility(
static inline integer_t clamp_value(integer_t value, FieldType type) {
auto typesize = sizeof_type(type) * CHAR_BIT;
integer_t minval = -(1 << (typesize-1));
integer_t maxval = (1 << (typesize-1))-1;
integer_t minval = -(1LL << (typesize-1));
integer_t maxval = (1LL << (typesize-1))-1;
return std::min(maxval, std::max(minval, value));
}