From 38f1e1359f468981b0f8d853d9605097cde7e6ea Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 9 Dec 2021 01:32:41 +0800 Subject: [PATCH] fix ci error in windows --- src/client/src/tscUtil.c | 7 +++---- src/util/src/tcompare.c | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 491857a979..e39d7c4207 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -5478,9 +5478,8 @@ int parseJsontoTagData(char* json, SKVRowBuilder* kvRowBuilder, char* errMsg, in // json key encode by binary char tagKey[TSDB_MAX_JSON_KEY_LEN + VARSTR_HEADER_SIZE] = {0}; - int32_t outLen = 0; strncpy(varDataVal(tagKey), jsonKey, strlen(jsonKey)); - outLen = strlen(jsonKey); + int32_t outLen = (int32_t)strlen(jsonKey); taosHashPut(keyHash, jsonKey, outLen, &outLen, CHAR_BYTES); // add key to hash to remove dumplicate, value is useless varDataSetLen(tagKey, outLen); @@ -5510,9 +5509,9 @@ int parseJsontoTagData(char* json, SKVRowBuilder* kvRowBuilder, char* errMsg, in tdAddColToKVRow(kvRowBuilder, jsonIndex++, TSDB_DATA_TYPE_BIGINT, tagVal, true); }else if(item->type == cJSON_True || item->type == cJSON_False){ char tagVal[CHAR_BYTES + CHAR_BYTES] = {0}; - *tagVal = jsonType2DbType(item->valueint, item->type); // type + *tagVal = jsonType2DbType((double)(item->valueint), item->type); // type char* tagData = POINTER_SHIFT(tagVal,CHAR_BYTES); - *tagData = item->valueint; + *tagData = (char)(item->valueint); tdAddColToKVRow(kvRowBuilder, jsonIndex++, TSDB_DATA_TYPE_BOOL, tagVal, true); }else if(item->type == cJSON_NULL){ char tagVal[CHAR_BYTES + VARSTR_HEADER_SIZE + INT_BYTES] = {0}; diff --git a/src/util/src/tcompare.c b/src/util/src/tcompare.c index a0499b5241..1cfc0c3873 100644 --- a/src/util/src/tcompare.c +++ b/src/util/src/tcompare.c @@ -244,8 +244,9 @@ int32_t compareJsonVal(const void *pLeft, const void *pRight) { }else if(type == TSDB_DATA_TYPE_BINARY) { //json null return 0; }else{ - assert(0); + assert(0); } + return 0; } /* -- GitLab