Merge pull request #21877 from taosdata/fix/TD-24967
fix: fix coverity scan issue
This commit is contained in:
commit
0eff07dc8f
|
@ -969,7 +969,7 @@ void taosFormatUtcTime(char* buf, int32_t bufLen, int64_t t, int32_t precision)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fractionLen = 0;
|
fractionLen = 0;
|
||||||
ASSERT(false);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (taosLocalTime(", &ptm, buf) == NULL) {
|
if (taosLocalTime(", &ptm, buf) == NULL) {
|
||||||
|
|
|
@ -474,8 +474,8 @@ double* tHistogramUniform(SHistogramInfo* pHisto, double* ratio, int32_t num) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERTS(total <= numOfElem && total + pHisto->elems[j + 1].num > numOfElem,
|
ASSERTS(total <= numOfElem && total + pHisto->elems[j + 1].num > numOfElem,
|
||||||
"tHistogramUniform Error, total:%d, numOfElem:%d, elems[%d].num:%d",
|
"tHistogramUniform Error, total:%ld, numOfElem:%ld, elems[%d].num:%ld",
|
||||||
total, numOfElem, j + 1, pHisto->elems[j + 1].num);
|
total, (int64_t)numOfElem, j + 1, pHisto->elems[j + 1].num);
|
||||||
|
|
||||||
double delta = numOfElem - total;
|
double delta = numOfElem - total;
|
||||||
if (fabs(delta) < FLT_EPSILON) {
|
if (fabs(delta) < FLT_EPSILON) {
|
||||||
|
|
|
@ -39,6 +39,7 @@ static SFilePage *loadDataFromFilePage(tMemBucket *pMemBucket, int32_t slotIdx)
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
pIdList = *(SArray **)p;
|
pIdList = *(SArray **)p;
|
||||||
} else {
|
} else {
|
||||||
|
taosMemoryFree(buffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ static SFilePage *loadDataFromFilePage(tMemBucket *pMemBucket, int32_t slotIdx)
|
||||||
|
|
||||||
SFilePage *pg = getBufPage(pMemBucket->pBuffer, *pageId);
|
SFilePage *pg = getBufPage(pMemBucket->pBuffer, *pageId);
|
||||||
if (pg == NULL) {
|
if (pg == NULL) {
|
||||||
|
taosMemoryFree(buffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3741,10 +3741,10 @@ int32_t fltSclBuildRangeFromBlockSma(SFltSclColumnRange *colRange, SColumnDataAg
|
||||||
taosArrayPush(points, &startPt);
|
taosArrayPush(points, &startPt);
|
||||||
taosArrayPush(points, &endPt);
|
taosArrayPush(points, &endPt);
|
||||||
}
|
}
|
||||||
SFltSclDatum min;
|
SFltSclDatum min = {0};
|
||||||
fltSclBuildDatumFromBlockSmaValue(&min, colRange->colNode->node.resType.type, pAgg->min);
|
fltSclBuildDatumFromBlockSmaValue(&min, colRange->colNode->node.resType.type, pAgg->min);
|
||||||
SFltSclPoint minPt = {.excl = false, .start = true, .val = min};
|
SFltSclPoint minPt = {.excl = false, .start = true, .val = min};
|
||||||
SFltSclDatum max;
|
SFltSclDatum max = {0};
|
||||||
fltSclBuildDatumFromBlockSmaValue(&max, colRange->colNode->node.resType.type, pAgg->max);
|
fltSclBuildDatumFromBlockSmaValue(&max, colRange->colNode->node.resType.type, pAgg->max);
|
||||||
SFltSclPoint maxPt = {.excl = false, .start = false, .val = max};
|
SFltSclPoint maxPt = {.excl = false, .start = false, .val = max};
|
||||||
taosArrayPush(points, &minPt);
|
taosArrayPush(points, &minPt);
|
||||||
|
|
Loading…
Reference in New Issue