From 6ef759ceadb6721b7e866bca8f76a1334d6553ad Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 26 Jul 2020 19:24:19 +0800 Subject: [PATCH] compile error for clang C --- src/mnode/src/mnodeCluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mnode/src/mnodeCluster.c b/src/mnode/src/mnodeCluster.c index 2c78a32d40..8933107dd1 100644 --- a/src/mnode/src/mnodeCluster.c +++ b/src/mnode/src/mnodeCluster.c @@ -142,7 +142,7 @@ static int32_t mnodeCreateCluster() { SClusterObj *pCluster = malloc(sizeof(SClusterObj)); memset(pCluster, 0, sizeof(SClusterObj)); pCluster->createdTime = taosGetTimestampMs(); - pCluster->clusterId = abs(((pCluster->createdTime >> 32) & (pCluster->createdTime)) | (*(int32_t*)tsFirst)); + pCluster->clusterId = labs((pCluster->createdTime >> 32) & (pCluster->createdTime)) | (*(int32_t*)tsFirst); SSdbOper oper = { .type = SDB_OPER_GLOBAL, -- GitLab