提交 0d98e248 编写于 作者: H Haojun Liao

[TD-225]fix compiler error.

上级 c04da26c
......@@ -119,7 +119,7 @@ int32_t tBucketIntHash(tMemBucket *pBucket, const void *value) {
// divide the value range into 1024 buckets
uint64_t span = pBucket->range.i64MaxVal - pBucket->range.i64MinVal;
if (span < pBucket->numOfSlots) {
int32_t delta = v - pBucket->range.i64MinVal;
int64_t delta = v - pBucket->range.i64MinVal;
index = (delta % pBucket->numOfSlots);
} else {
double slotSpan = (double)span / pBucket->numOfSlots;
......@@ -141,8 +141,8 @@ int32_t tBucketUintHash(tMemBucket *pBucket, const void *value) {
// divide the value range into 1024 buckets
uint64_t span = pBucket->range.u64MaxVal - pBucket->range.u64MinVal;
if (span < pBucket->numOfSlots) {
int32_t delta = v - pBucket->range.u64MinVal;
index = (delta % pBucket->numOfSlots);
int64_t delta = v - pBucket->range.u64MinVal;
index = (int32_t) (delta % pBucket->numOfSlots);
} else {
double slotSpan = (double)span / pBucket->numOfSlots;
index = (int32_t)((v - pBucket->range.u64MinVal) / slotSpan);
......@@ -515,4 +515,4 @@ bool isIdenticalData(tMemBucket *pMemBucket, int32_t index) {
} else {
return pSeg->range.i64MinVal == pSeg->range.i64MaxVal;
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册