fix 2.0 branch compile warning.

This commit is contained in:
Shuduo Sang 2020-04-06 21:39:09 +08:00
parent fb92f93f11
commit 2b72bab466
5 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/util/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/query/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/mnode/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/vnode/tsdb/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/common/inc)
INCLUDE_DIRECTORIES(${TD_ENTERPRISE_DIR}/src/inc)

View File

@ -28,6 +28,7 @@
#include "dnodeRead.h"
#include "dnodeShell.h"
#include "dnodeWrite.h"
#include "mgmtGrant.h"
static int32_t dnodeInitSystem();
static int32_t dnodeInitStorage();

View File

@ -654,7 +654,7 @@ static int32_t tsdbSetRepoEnv(STsdbRepo *pRepo) {
}
static int32_t tsdbDestroyRepoEnv(STsdbRepo *pRepo) {
char fname[128];
char fname[260];
if (pRepo == NULL) return 0;
char *dirName = calloc(1, strlen(pRepo->rootDir) + strlen("tsdb") + 2);
if (dirName == NULL) {

View File

@ -45,6 +45,8 @@ static int32_t doQuery(TAOS* taos, const char* sql) {
}
taos_free_result(res);
return 0;
}
int main(int argc, char *argv[]) {

View File

@ -290,7 +290,7 @@ loop_end:
input_buffer->offset += (size_t)(after_end - number_c_string);
strncpy(item->numberstring, number_c_string, 12);
strncpy(item->numberstring, (const char *)number_c_string, 12);
return true;
}