From a427d5bc2868a5407bd34f4959f5cff8c2618940 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Thu, 11 Jun 2020 12:57:19 +0800 Subject: [PATCH] [TD-573] --- tests/examples/c/demo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/examples/c/demo.c b/tests/examples/c/demo.c index 55a19eb5f9..91acb5dc61 100644 --- a/tests/examples/c/demo.c +++ b/tests/examples/c/demo.c @@ -30,7 +30,7 @@ static int32_t doQuery(TAOS* taos, const char* sql) { TAOS_RES* res = taos_query(taos, sql); if (taos_errno(res) != 0) { - printf("failed to execute query, reason:%s\n", taos_errstr(res)); + printf("failed to execute query, reason:%s\n", taos_errstr(taos)); return -1; } @@ -77,7 +77,7 @@ static __attribute__((unused)) void multiThreadTest(int32_t numOfThreads, void* pthread_attr_init(&thattr); pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_JOINABLE); - pthread_t* threadId = malloc(sizeof(pthread_t)*numOfThreads); + pthread_t* threadId = (pthread_t*)malloc(sizeof(pthread_t)*(uint32_t)numOfThreads); for (int i = 0; i < numOfThreads; ++i) { pthread_create(&threadId[i], NULL, oneLoader, conn); -- GitLab