From 0f9d7170ed7c6ea1afa8109cdb67d4f5be1ef734 Mon Sep 17 00:00:00 2001 From: Aiee <18348405+Aiee@users.noreply.github.com> Date: Fri, 30 Dec 2022 17:05:47 +0800 Subject: [PATCH 1/5] Fix clang compilation --- src/graph/validator/AdminValidator.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/graph/validator/AdminValidator.h b/src/graph/validator/AdminValidator.h index c152c4e10fa..6fff85de91b 100644 --- a/src/graph/validator/AdminValidator.h +++ b/src/graph/validator/AdminValidator.h @@ -386,9 +386,6 @@ class KillSessionValidator final : public Validator { private: Status validateImpl() override; Status toPlan() override; - - private: - SessionID sessionId_{-1}; }; class GetSessionValidator final : public Validator { From 54bd80d57bb8469e3e500017054bbcd66ee5d4a1 Mon Sep 17 00:00:00 2001 From: Aiee <18348405+Aiee@users.noreply.github.com> Date: Fri, 30 Dec 2022 17:20:54 +0800 Subject: [PATCH 2/5] Add ubuntu2004 back to the workflow --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d0d83f90021..85df78b2182 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -57,7 +57,7 @@ jobs: matrix: os: - centos7 - # - ubuntu2004 + - ubuntu2004 compiler: - gcc-9.3 - clang-10 From 4128f441b143c8719e2d9cf60db900a0a10053db Mon Sep 17 00:00:00 2001 From: codesigner Date: Fri, 30 Dec 2022 20:46:00 +0800 Subject: [PATCH 3/5] fix build with clang --- src/common/memory/NewDelete.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/memory/NewDelete.cpp b/src/common/memory/NewDelete.cpp index afbf1dd2b93..ccee9cc95f9 100644 --- a/src/common/memory/NewDelete.cpp +++ b/src/common/memory/NewDelete.cpp @@ -15,10 +15,11 @@ /// 2. address_sanitizer is off /// sanitizer has already override the new/delete operator, /// only override new/delete operator only when address_sanitizer is off -#if defined(__clang) +#if defined(__clang__) #if defined(__has_feature) #if not __has_feature(address_sanitizer) #define ENABLE_MEMORY_TRACKER +#warning "enable memory tracker compiled with clang" #endif #endif From 985b33d223bd49d11f0cc7a62be9e1284431c2cd Mon Sep 17 00:00:00 2001 From: codesigner Date: Fri, 30 Dec 2022 20:51:04 +0800 Subject: [PATCH 4/5] fix build with clang --- src/common/memory/NewDelete.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/common/memory/NewDelete.cpp b/src/common/memory/NewDelete.cpp index ccee9cc95f9..4ff129cf331 100644 --- a/src/common/memory/NewDelete.cpp +++ b/src/common/memory/NewDelete.cpp @@ -19,7 +19,6 @@ #if defined(__has_feature) #if not __has_feature(address_sanitizer) #define ENABLE_MEMORY_TRACKER -#warning "enable memory tracker compiled with clang" #endif #endif From d1e3831471ee91f07b3ad1eb27ed2dab973fc1f5 Mon Sep 17 00:00:00 2001 From: codesigner Date: Fri, 30 Dec 2022 21:03:34 +0800 Subject: [PATCH 5/5] fix build with clang --- src/common/memory/MemoryUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/memory/MemoryUtils.cpp b/src/common/memory/MemoryUtils.cpp index e90ef033940..aded2dd96cf 100644 --- a/src/common/memory/MemoryUtils.cpp +++ b/src/common/memory/MemoryUtils.cpp @@ -135,7 +135,7 @@ StatusOr MemoryUtils::hitsHighWatermark() { int64_t now = time::WallClock::fastNowInSec(); if (now - kLastPurge_ > FLAGS_memory_purge_interval_seconds) { // mallctl seems has issue with address_sanitizer, do purge only when address_sanitizer is off -#if defined(__clang) +#if defined(__clang__) #if defined(__has_feature) #if not __has_feature(address_sanitizer) mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".purge", nullptr, nullptr, nullptr, 0);