提交 9eae79a1 编写于 作者: wmmhello's avatar wmmhello

fix: complie error in windows

上级 2bd4c095
...@@ -820,9 +820,9 @@ static int8_t smlGetTsTypeByPrecision(int8_t precision) { ...@@ -820,9 +820,9 @@ static int8_t smlGetTsTypeByPrecision(int8_t precision) {
} }
static int64_t smlParseInfluxTime(SSmlHandle *info, const char *data, int32_t len) { static int64_t smlParseInfluxTime(SSmlHandle *info, const char *data, int32_t len) {
char *tmp = (char*)taosMemoryCalloc(1, len + 1); void *tmp = taosMemoryCalloc(1, len + 1);
memcpy(tmp, data, len); memcpy(tmp, data, len);
uDebug("SML:0x%" PRIx64 " smlParseInfluxTime ts:%s", info->id, tmp); uDebug("SML:0x%" PRIx64 " smlParseInfluxTime tslen:%d, ts:%s", info->id, len, (char*)tmp);
taosMemoryFree(tmp); taosMemoryFree(tmp);
if (len == 0 || (len == 1 && data[0] == '0')) { if (len == 0 || (len == 1 && data[0] == '0')) {
...@@ -2076,9 +2076,9 @@ static int32_t smlParseJSONString(SSmlHandle *info, cJSON *root, SSmlTableInfo * ...@@ -2076,9 +2076,9 @@ static int32_t smlParseJSONString(SSmlHandle *info, cJSON *root, SSmlTableInfo *
static int32_t smlParseInfluxLine(SSmlHandle *info, const char *sql, const int len) { static int32_t smlParseInfluxLine(SSmlHandle *info, const char *sql, const int len) {
SSmlLineInfo elements = {0}; SSmlLineInfo elements = {0};
char *tmp = (char*)taosMemoryCalloc(1, len + 1); void *tmp = taosMemoryCalloc(1, len + 1);
memcpy(tmp, sql, len); memcpy(tmp, sql, len);
uDebug("SML:0x%" PRIx64 " smlParseInfluxLine raw:%d, sql:%s", info->id, info->isRawLine, (info->isRawLine ? tmp : sql)); uDebug("SML:0x%" PRIx64 " smlParseInfluxLine raw:%d, len:%d, sql:%s", info->id, info->isRawLine, len, (info->isRawLine ? (char*)tmp : sql));
taosMemoryFree(tmp); taosMemoryFree(tmp);
int ret = smlParseInfluxString(sql, sql + len, &elements, &info->msgBuf); int ret = smlParseInfluxString(sql, sql + len, &elements, &info->msgBuf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册