resolve static check warnings
This commit is contained in:
parent
4b15fd32af
commit
6a18a23873
|
@ -326,8 +326,8 @@ static tSQLSyntaxNode *createSyntaxTree(SSchema *pSchema, int32_t numOfCols, cha
|
||||||
uint8_t localOptr = getBinaryExprOptr(&t0);
|
uint8_t localOptr = getBinaryExprOptr(&t0);
|
||||||
if (localOptr == 0) {
|
if (localOptr == 0) {
|
||||||
pError("not support binary operator:%d", t0.type);
|
pError("not support binary operator:%d", t0.type);
|
||||||
return NULL;
|
|
||||||
free(pBinExpr)
|
free(pBinExpr)
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return parseRemainStr(str, pBinExpr, pSchema, localOptr, numOfCols, i);
|
return parseRemainStr(str, pBinExpr, pSchema, localOptr, numOfCols, i);
|
||||||
|
|
|
@ -733,6 +733,7 @@ STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete) {
|
||||||
|
|
||||||
pTSBuf->f = fopen(pTSBuf->path, "r");
|
pTSBuf->f = fopen(pTSBuf->path, "r");
|
||||||
if (pTSBuf->f == NULL) {
|
if (pTSBuf->f == NULL) {
|
||||||
|
free(pTSBuf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -774,7 +775,7 @@ STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete) {
|
||||||
size_t infoSize = sizeof(STSVnodeBlockInfo) * pTSBuf->numOfVnodes;
|
size_t infoSize = sizeof(STSVnodeBlockInfo) * pTSBuf->numOfVnodes;
|
||||||
|
|
||||||
STSVnodeBlockInfo* buf = (STSVnodeBlockInfo*)calloc(1, infoSize);
|
STSVnodeBlockInfo* buf = (STSVnodeBlockInfo*)calloc(1, infoSize);
|
||||||
int64_t pos = ftell(pTSBuf->f);
|
//int64_t pos = ftell(pTSBuf->f); //pos not used
|
||||||
fread(buf, infoSize, 1, pTSBuf->f);
|
fread(buf, infoSize, 1, pTSBuf->f);
|
||||||
|
|
||||||
// the length value for each vnode is not kept in file, so does not set the length value
|
// the length value for each vnode is not kept in file, so does not set the length value
|
||||||
|
@ -1251,6 +1252,10 @@ bool tsBufNextPos(STSBuf* pTSBuf) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pBlockInfo == NULL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t blockIndex = pCur->order == TSQL_SO_ASC ? 0 : pBlockInfo->numOfBlocks - 1;
|
int32_t blockIndex = pCur->order == TSQL_SO_ASC ? 0 : pBlockInfo->numOfBlocks - 1;
|
||||||
tsBufGetBlock(pTSBuf, pCur->vnodeIndex + step, blockIndex);
|
tsBufGetBlock(pTSBuf, pCur->vnodeIndex + step, blockIndex);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue