From 09298ae36cfb46f14db652bb8f281b0d292a7dbb Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 19 Jun 2020 10:42:24 +0800 Subject: [PATCH] fix compile error in arm64 --- src/util/src/tkvstore.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/util/src/tkvstore.c b/src/util/src/tkvstore.c index 07da337bc1..8e7b9b30f1 100644 --- a/src/util/src/tkvstore.c +++ b/src/util/src/tkvstore.c @@ -445,10 +445,11 @@ static void *tdDecodeKVRecord(void *buf, SKVRecord *pRecord) { } static int tdRestoreKVStore(SKVStore *pStore) { - char tbuf[128] = "\0"; - void * buf = NULL; - int maxBufSize = 0; - SKVRecord rInfo = {0}; + char tbuf[128] = "\0"; + void * buf = NULL; + int maxBufSize = 0; + SKVRecord rInfo = {0}; + SHashMutableIterator *pIter = NULL; ASSERT(TD_KVSTORE_HEADER_SIZE == lseek(pStore->fd, 0, SEEK_CUR)); @@ -497,7 +498,7 @@ static int tdRestoreKVStore(SKVStore *pStore) { goto _err; } - SHashMutableIterator *pIter = taosHashCreateIter(pStore->map); + pIter = taosHashCreateIter(pStore->map); if (pIter == NULL) { uError("failed to create hash iter while opening KV store %s", pStore->fname); terrno = TSDB_CODE_COM_OUT_OF_MEMORY; -- GitLab