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:
|
||||
fractionLen = 0;
|
||||
ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
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,
|
||||
"tHistogramUniform Error, total:%d, numOfElem:%d, elems[%d].num:%d",
|
||||
total, numOfElem, j + 1, pHisto->elems[j + 1].num);
|
||||
"tHistogramUniform Error, total:%ld, numOfElem:%ld, elems[%d].num:%ld",
|
||||
total, (int64_t)numOfElem, j + 1, pHisto->elems[j + 1].num);
|
||||
|
||||
double delta = numOfElem - total;
|
||||
if (fabs(delta) < FLT_EPSILON) {
|
||||
|
|
|
@ -39,6 +39,7 @@ static SFilePage *loadDataFromFilePage(tMemBucket *pMemBucket, int32_t slotIdx)
|
|||
if (p != NULL) {
|
||||
pIdList = *(SArray **)p;
|
||||
} else {
|
||||
taosMemoryFree(buffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -48,6 +49,7 @@ static SFilePage *loadDataFromFilePage(tMemBucket *pMemBucket, int32_t slotIdx)
|
|||
|
||||
SFilePage *pg = getBufPage(pMemBucket->pBuffer, *pageId);
|
||||
if (pg == NULL) {
|
||||
taosMemoryFree(buffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -3741,10 +3741,10 @@ int32_t fltSclBuildRangeFromBlockSma(SFltSclColumnRange *colRange, SColumnDataAg
|
|||
taosArrayPush(points, &startPt);
|
||||
taosArrayPush(points, &endPt);
|
||||
}
|
||||
SFltSclDatum min;
|
||||
SFltSclDatum min = {0};
|
||||
fltSclBuildDatumFromBlockSmaValue(&min, colRange->colNode->node.resType.type, pAgg->min);
|
||||
SFltSclPoint minPt = {.excl = false, .start = true, .val = min};
|
||||
SFltSclDatum max;
|
||||
SFltSclDatum max = {0};
|
||||
fltSclBuildDatumFromBlockSmaValue(&max, colRange->colNode->node.resType.type, pAgg->max);
|
||||
SFltSclPoint maxPt = {.excl = false, .start = false, .val = max};
|
||||
taosArrayPush(points, &minPt);
|
||||
|
|
Loading…
Reference in New Issue