Merge pull request #2457 from taosdata/bugfix/client-coverity
fix some coverity issues
This commit is contained in:
commit
9c0936ddb0
|
@ -315,7 +315,11 @@ void tscCreateLocalReducer(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrd
|
|||
|
||||
pReducer->finalRowSize = tscGetResRowLength(pQueryInfo->exprList);
|
||||
pReducer->resColModel = finalmodel;
|
||||
pReducer->resColModel->capacity = pReducer->nResultBufSize / pReducer->finalRowSize;
|
||||
pReducer->resColModel->capacity = pReducer->nResultBufSize;
|
||||
assert(pReducer->finalRowSize > 0);
|
||||
if (pReducer->finalRowSize > 0) {
|
||||
pReducer->resColModel->capacity /= pReducer->finalRowSize;
|
||||
}
|
||||
assert(pReducer->finalRowSize <= pReducer->rowSize);
|
||||
|
||||
pReducer->pFinalRes = calloc(1, pReducer->rowSize * pReducer->resColModel->capacity);
|
||||
|
|
|
@ -802,7 +802,10 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql) {
|
|||
}
|
||||
|
||||
STableMetaInfo *pSTableMeterMetaInfo = tscGetMetaInfo(pQueryInfo, STABLE_INDEX);
|
||||
tscSetTableFullName(pSTableMeterMetaInfo, &sToken, pSql);
|
||||
code = tscSetTableFullName(pSTableMeterMetaInfo, &sToken, pSql);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
return code;
|
||||
}
|
||||
|
||||
tstrncpy(pTag->name, pSTableMeterMetaInfo->name, sizeof(pTag->name));
|
||||
code = tscGetTableMeta(pSql, pSTableMeterMetaInfo);
|
||||
|
|
|
@ -936,8 +936,11 @@ static SJoinSupporter* tscUpdateSubqueryStatus(SSqlObj* pSql, int32_t numOfFetch
|
|||
}
|
||||
}
|
||||
|
||||
pState->numOfTotal = pSql->numOfSubs;
|
||||
pState->numOfRemain = numOfFetch;
|
||||
assert(pState != NULL);
|
||||
if (pState != NULL) {
|
||||
pState->numOfTotal = pSql->numOfSubs;
|
||||
pState->numOfRemain = numOfFetch;
|
||||
}
|
||||
|
||||
return pSupporter;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ int main(int argc, char *argv[]) {
|
|||
tdFreeSchema(pSchema);
|
||||
|
||||
while (1) {
|
||||
char c = getchar();
|
||||
char c = (char)getchar();
|
||||
|
||||
switch(c) {
|
||||
case 's':
|
||||
|
|
|
@ -5910,7 +5910,7 @@ int32_t qCreateQueryInfo(void *tsdb, int32_t vgId, SQueryTableMsg *pQueryMsg, qi
|
|||
|
||||
if ((code = convertQueryMsg(pQueryMsg, &pTableIdList, &pExprMsg, &tagCond, &tbnameCond, &pGroupColIndex, &pTagColumnInfo)) !=
|
||||
TSDB_CODE_SUCCESS) {
|
||||
return code;
|
||||
goto _over;
|
||||
}
|
||||
|
||||
if (pQueryMsg->numOfTables <= 0) {
|
||||
|
|
Loading…
Reference in New Issue