Skip to content

Commit

Permalink
Fix clang compilation (#5172)
Browse files Browse the repository at this point in the history
* Fix clang compilation

* Add ubuntu2004 back to the workflow

* fix build with clang

* fix build with clang

* fix build with clang

Co-authored-by: kyle.cao <kyle.cao@vesoft.com>
Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
Co-authored-by: codesigner <codesigner.huang@vesoft.com>
  • Loading branch information
4 people authored Dec 30, 2022
1 parent 9371098 commit 7047fb7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
matrix:
os:
- centos7
# - ubuntu2004
- ubuntu2004
compiler:
- gcc-9.3
- clang-10
Expand Down
2 changes: 1 addition & 1 deletion src/common/memory/MemoryUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ StatusOr<bool> 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);
Expand Down
2 changes: 1 addition & 1 deletion src/common/memory/NewDelete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// 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
Expand Down
3 changes: 0 additions & 3 deletions src/graph/validator/AdminValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7047fb7

Please sign in to comment.