From 46516d98a308eac92adbe9f7ca9a6376869a4a4b Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 17 Sep 2020 10:52:50 +0800 Subject: [PATCH] compile in windows --- src/client/inc/tsclient.h | 4 ++-- src/client/src/tscFunctionImpl.c | 4 ++-- src/client/src/tscSubquery.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index 74a0e8c11c..952dcde962 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -334,7 +334,7 @@ typedef struct STscObj { struct SSqlStream *streamList; void* pDnodeConn; pthread_mutex_t mutex; - T_REF_DECLARE(); + T_REF_DECLARE() } STscObj; typedef struct SSqlObj { @@ -470,7 +470,7 @@ static FORCE_INLINE void tscGetResultColumnChr(SSqlRes* pRes, SFieldInfo* pField int32_t type = pInfo->pSqlExpr->resType; int32_t bytes = pInfo->pSqlExpr->resBytes; - char* pData = pRes->data + pInfo->pSqlExpr->offset * pRes->numOfRows + bytes * pRes->row; + char* pData = pRes->data + (int32_t)(pInfo->pSqlExpr->offset * pRes->numOfRows + bytes * pRes->row); // user defined constant value output columns if (TSDB_COL_IS_UD_COL(pInfo->pSqlExpr->colInfo.flag)) { diff --git a/src/client/src/tscFunctionImpl.c b/src/client/src/tscFunctionImpl.c index 1356b98c67..edeca86c17 100644 --- a/src/client/src/tscFunctionImpl.c +++ b/src/client/src/tscFunctionImpl.c @@ -2453,11 +2453,11 @@ static void percentile_function(SQLFunctionCtx *pCtx) { if (pInfo->stage == 0) { if (pCtx->preAggVals.isSet) { if (pInfo->minval > pCtx->preAggVals.statis.min) { - pInfo->minval = pCtx->preAggVals.statis.min; + pInfo->minval = (double)pCtx->preAggVals.statis.min; } if (pInfo->maxval < pCtx->preAggVals.statis.max) { - pInfo->maxval = pCtx->preAggVals.statis.max; + pInfo->maxval = (double)pCtx->preAggVals.statis.max; } pInfo->numOfElems += (pCtx->size - pCtx->preAggVals.statis.numOfNull); diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 4246abf52d..10820d8c57 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1950,7 +1950,7 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) { SSqlCmd *pCmd = &pSql->cmd; SSqlRes *pRes = &pSql->res; - pSql->numOfSubs = taosArrayGetSize(pCmd->pDataBlocks); + pSql->numOfSubs = (uint16_t)taosArrayGetSize(pCmd->pDataBlocks); assert(pSql->numOfSubs > 0); pRes->code = TSDB_CODE_SUCCESS; -- GitLab