From 88e6b8311bdc9bf065e09c170d30df4eee19e126 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 16 Nov 2020 16:56:20 +0800 Subject: [PATCH] compile in windows --- src/client/src/tscLocalMerge.c | 2 +- src/client/src/tscSQLParser.c | 2 +- src/client/src/tscServer.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/src/tscLocalMerge.c b/src/client/src/tscLocalMerge.c index c66c4f684c..0440ef77ad 100644 --- a/src/client/src/tscLocalMerge.c +++ b/src/client/src/tscLocalMerge.c @@ -1251,7 +1251,7 @@ bool genFinalResults(SSqlObj *pSql, SLocalReducer *pLocalReducer, bool noMoreCur if (tscIsSecondStageQuery(pQueryInfo)) { char* pbuf = calloc(1,pResBuf->num * pModel->rowSize); - doArithmeticCalculate(pQueryInfo, pbuf, pResBuf->data, pResBuf->num); + doArithmeticCalculate(pQueryInfo, pbuf, pResBuf->data, (int32_t)pResBuf->num); memcpy(pResBuf->data, pbuf, pResBuf->num * pModel->rowSize); free(pbuf); } diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index f23a632b67..b56603e557 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1410,7 +1410,7 @@ static int32_t handleArithmeticExpr(SSqlCmd* pCmd, int32_t clauseIndex, int32_t // TODO: other error handling } END_TRY - pInfo->pArithExprInfo->base.arg[0].argBytes = tbufTell(&bw); + pInfo->pArithExprInfo->base.arg[0].argBytes = (int16_t) tbufTell(&bw); pInfo->pArithExprInfo->base.arg[0].argValue.pz = tbufGetData(&bw, true); pInfo->pArithExprInfo->base.arg[0].argType = TSDB_DATA_TYPE_BINARY; tbufCloseWriter(&bw); diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 343eba6ddc..e8b6cb284e 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -789,7 +789,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) { if(tscIsSecondStageQuery(pQueryInfo)) { size_t output = tscNumOfFields(pQueryInfo); - pQueryMsg->secondStageOutput = htonl(output); + pQueryMsg->secondStageOutput = htonl((int32_t) output); SSqlFuncMsg *pSqlFuncExpr1 = (SSqlFuncMsg *)pMsg; -- GitLab