enh:[TD-30998] Handling return value in scalarTest.c
This commit is contained in:
parent
71e57b1dfc
commit
e7c58ff8c8
|
@ -1172,7 +1172,7 @@ int32_t filterAddUnitImpl(SFilterInfo *info, uint8_t optr, SFilterFieldId *left,
|
|||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
info->units = (SFilterUnit *)tmp;
|
||||
memset(info->units + psize, 0, sizeof(*info->units) * FILTER_DEFAULT_UNIT_SIZE);
|
||||
(void)memset(info->units + psize, 0, sizeof(*info->units) * FILTER_DEFAULT_UNIT_SIZE);
|
||||
}
|
||||
|
||||
SFilterUnit *u = &info->units[info->unitNum];
|
||||
|
@ -1485,7 +1485,7 @@ int32_t filterAddGroupUnitFromCtx(SFilterInfo *dst, SFilterInfo *src, SFilterRan
|
|||
|
||||
if (ctx->notnull) {
|
||||
ASSERT(!ctx->isrange);
|
||||
memset(g, 0, sizeof(*g));
|
||||
(void)memset(g, 0, sizeof(*g));
|
||||
|
||||
FLT_ERR_RET(filterAddUnit(dst, OP_TYPE_IS_NOT_NULL, &left, NULL, &uidx));
|
||||
FLT_ERR_RET(filterAddUnitToGroup(g, uidx));
|
||||
|
@ -1503,7 +1503,7 @@ int32_t filterAddGroupUnitFromCtx(SFilterInfo *dst, SFilterInfo *src, SFilterRan
|
|||
SFilterRangeNode *r = ctx->rs;
|
||||
|
||||
while (r) {
|
||||
memset(g, 0, sizeof(*g));
|
||||
(void)memset(g, 0, sizeof(*g));
|
||||
|
||||
if ((!FILTER_GET_FLAG(r->ra.sflag, RANGE_FLG_NULL)) && (!FILTER_GET_FLAG(r->ra.eflag, RANGE_FLG_NULL))) {
|
||||
__compar_fn_t func = getComparFunc(type, 0);
|
||||
|
@ -2158,7 +2158,7 @@ int32_t fltInitValFieldData(SFilterInfo *info) {
|
|||
return TSDB_CODE_APP_ERROR;
|
||||
}
|
||||
varDataSetLen(newValData, len);
|
||||
varDataCopy(fi->data, newValData);
|
||||
(void)varDataCopy(fi->data, newValData);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2790,7 +2790,7 @@ int32_t filterRewrite(SFilterInfo *info, SFilterGroupCtx **gRes, int32_t gResNum
|
|||
FLT_ERR_JRET(terrno);
|
||||
}
|
||||
|
||||
memset(info, 0, sizeof(*info));
|
||||
(void)memset(info, 0, sizeof(*info));
|
||||
|
||||
info->colRangeNum = oinfo.colRangeNum;
|
||||
info->colRange = oinfo.colRange;
|
||||
|
@ -3009,7 +3009,7 @@ int32_t filterUpdateComUnits(SFilterInfo *info) {
|
|||
int32_t filterRmUnitByRange(SFilterInfo *info, SColumnDataAgg *pDataStatis, int32_t numOfCols, int32_t numOfRows) {
|
||||
int32_t rmUnit = 0;
|
||||
|
||||
memset(info->blkUnitRes, 0, sizeof(*info->blkUnitRes) * info->unitNum);
|
||||
(void)memset(info->blkUnitRes, 0, sizeof(*info->blkUnitRes) * info->unitNum);
|
||||
|
||||
for (uint32_t k = 0; k < info->unitNum; ++k) {
|
||||
int32_t index = -1;
|
||||
|
@ -4393,7 +4393,7 @@ int32_t filterConverNcharColumns(SFilterInfo *info, int32_t rows, bool *gotNchar
|
|||
if (k == varSrcLen) {
|
||||
/* NULL */
|
||||
varDataLen(dst) = (VarDataLenT)varSrcLen;
|
||||
varDataCopy(dst, src);
|
||||
(void)varDataCopy(dst, src);
|
||||
continue;
|
||||
}
|
||||
bool ret = taosMbsToUcs4(varDataVal(src), varDataLen(src), (TdUcs4 *)varDataVal(dst), bufSize, &len);
|
||||
|
|
|
@ -1566,7 +1566,7 @@ EDealRes sclWalkTarget(SNode *pNode, SScalarCtx *ctx) {
|
|||
block->info.rows = res->numOfRows;
|
||||
|
||||
sclFreeParam(res);
|
||||
taosHashRemove(ctx->pRes, (void *)&target->pExpr, POINTER_BYTES);
|
||||
(void)taosHashRemove(ctx->pRes, (void *)&target->pExpr, POINTER_BYTES);
|
||||
return DEAL_RES_CONTINUE;
|
||||
}
|
||||
|
||||
|
@ -1789,7 +1789,7 @@ int32_t scalarCalculate(SNode *pNode, SArray *pBlockList, SScalarParam *pDst) {
|
|||
}
|
||||
|
||||
sclFreeParam(res);
|
||||
taosHashRemove(ctx.pRes, (void *)&pNode, POINTER_BYTES);
|
||||
(void)taosHashRemove(ctx.pRes, (void *)&pNode, POINTER_BYTES);
|
||||
}
|
||||
|
||||
_return:
|
||||
|
|
|
@ -2117,7 +2117,7 @@ int32_t vectorJsonContains(SScalarParam *pLeft, SScalarParam *pRight, SScalarPar
|
|||
if (NULL == jsonKey) {
|
||||
SCL_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
memcpy(jsonKey, varDataVal(pRightData), varDataLen(pRightData));
|
||||
(void)memcpy(jsonKey, varDataVal(pRightData), varDataLen(pRightData));
|
||||
for (; i >= 0 && i < pLeft->numOfRows; i += step) {
|
||||
bool isExist = false;
|
||||
|
||||
|
@ -2151,7 +2151,7 @@ int32_t vectorJsonArrow(SScalarParam *pLeft, SScalarParam *pRight, SScalarParam
|
|||
if (NULL == jsonKey) {
|
||||
SCL_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
memcpy(jsonKey, varDataVal(pRightData), varDataLen(pRightData));
|
||||
(void)memcpy(jsonKey, varDataVal(pRightData), varDataLen(pRightData));
|
||||
for (; i >= 0 && i < pLeft->numOfRows; i += step) {
|
||||
if (colDataIsNull_var(pLeft->columnData, i)) {
|
||||
colDataSetNull_var(pOutputCol, i);
|
||||
|
|
|
@ -64,6 +64,9 @@ void flttInitLogFile() {
|
|||
|
||||
int32_t flttMakeValueNode(SNode **pNode, int32_t dataType, void *value) {
|
||||
SNode *node = (SNode *)nodesMakeNode(QUERY_NODE_VALUE);
|
||||
if (NULL == node) {
|
||||
FLT_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
SValueNode *vnode = (SValueNode *)node;
|
||||
vnode->node.resType.type = dataType;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue