提交 07a39d38 编写于 作者: sangshuduo's avatar sangshuduo

[TD-1946] <fix>: fix compile issues for VS2019 16.7 on Windows

上级 647148db
...@@ -2366,7 +2366,7 @@ void tscBuildResFromSubqueries(SSqlObj *pSql) { ...@@ -2366,7 +2366,7 @@ void tscBuildResFromSubqueries(SSqlObj *pSql) {
SQueryInfo* pQueryInfo = tscGetQueryInfoDetail(&pSql->cmd, pSql->cmd.clauseIndex); SQueryInfo* pQueryInfo = tscGetQueryInfoDetail(&pSql->cmd, pSql->cmd.clauseIndex);
size_t numOfExprs = tscSqlExprNumOfExprs(pQueryInfo); size_t numOfExprs = tscSqlExprNumOfExprs(pQueryInfo);
pRes->numOfCols = (int32_t)numOfExprs; pRes->numOfCols = (int16_t)numOfExprs;
pRes->tsrow = calloc(numOfExprs, POINTER_BYTES); pRes->tsrow = calloc(numOfExprs, POINTER_BYTES);
pRes->buffer = calloc(numOfExprs, POINTER_BYTES); pRes->buffer = calloc(numOfExprs, POINTER_BYTES);
......
...@@ -44,7 +44,7 @@ long interlocked_add_fetch_32(long volatile* ptr, long val) { ...@@ -44,7 +44,7 @@ long interlocked_add_fetch_32(long volatile* ptr, long val) {
__int64 interlocked_add_fetch_64(__int64 volatile* ptr, __int64 val) { __int64 interlocked_add_fetch_64(__int64 volatile* ptr, __int64 val) {
//#ifdef _WIN64 //#ifdef _WIN64
return _InterlockedExchangeAdd64(ptr, val) + val; return InterlockedExchangeAdd64(ptr, val) + val;
//#else //#else
// return _InterlockedExchangeAdd(ptr, val) + val; // return _InterlockedExchangeAdd(ptr, val) + val;
//#endif //#endif
......
...@@ -65,12 +65,12 @@ int64_t taosFSendFile(FILE *out_file, FILE *in_file, int64_t *offset, int64_t co ...@@ -65,12 +65,12 @@ int64_t taosFSendFile(FILE *out_file, FILE *in_file, int64_t *offset, int64_t co
int64_t remain = count - writeLen; int64_t remain = count - writeLen;
if (remain > 0) { if (remain > 0) {
size_t rlen = fread(buffer, 1, remain, in_file); size_t rlen = fread(buffer, 1, (size_t) remain, in_file);
if (rlen <= 0) { if (rlen <= 0) {
return writeLen; return writeLen;
} }
else { else {
fwrite(buffer, 1, remain, out_file); fwrite(buffer, 1, (size_t) remain, out_file);
writeLen += remain; writeLen += remain;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册