From 6b51e21525668b11ffc144b09d3331a97dfdeaee Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Mon, 24 Jan 2022 13:06:47 +0800 Subject: [PATCH] (query):fix windows compilation error --- src/common/src/texpr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index e54ffd5f49..3fd7bdd92e 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -1550,7 +1550,7 @@ void vectorLowerUpperTrimFunc(int16_t functionId, tExprOperandInfo *pInputs, int int32_t resultByteLen = (inputType == TSDB_DATA_TYPE_BINARY) ? resultCharLen : resultCharLen * TSDB_NCHAR_SIZE; int32_t beginByteLen = (inputType == TSDB_DATA_TYPE_BINARY) ? k : k * TSDB_NCHAR_SIZE; varDataSetLen(outputData, resultByteLen); - memcpy(varDataVal(outputData),varDataVal(inputData[0])+beginByteLen, resultByteLen); + memcpy((char*)varDataVal(outputData),(char*)varDataVal(inputData[0])+beginByteLen, resultByteLen); break; } @@ -1629,7 +1629,7 @@ void vectorSubstrFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t num varDataSetLen(outputData, resultLenBytes); if (resultLenBytes > 0) { - memcpy(varDataVal(outputData), varDataVal(inputData) + resultStartBytes, resultLenBytes); + memcpy((char*)varDataVal(outputData), (char*)varDataVal(inputData) + resultStartBytes, resultLenBytes); } } } -- GitLab