Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compile error for clang compiler
Browse files Browse the repository at this point in the history
qinzuoyan committed Jun 13, 2018
1 parent 7be488e commit 0043e1f
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion include/dsn/tool-api/task.h
Original file line number Diff line number Diff line change
@@ -437,7 +437,7 @@ class rpc_request_task : public task

message_ex *get_request() const { return _request; }

DSN_API void enqueue() override;
void enqueue() override;

void exec() override
{
@@ -587,7 +587,11 @@ class aio_task : public task
aio_task(task_code code, aio_handler &&cb, int hash = 0, service_node *node = nullptr);
~aio_task();

// tell the compiler that we want both the enqueue from base task and ours
// to prevent the compiler complaining -Werror,-Woverloaded-virtual.
using task::enqueue;
void enqueue(error_code err, size_t transferred_size);

size_t get_transferred_size() const { return _transferred_size; }
disk_aio *aio() { return _aio; }

7 changes: 7 additions & 0 deletions src/core/tests/autoref_ptr_test.cpp
Original file line number Diff line number Diff line change
@@ -137,6 +137,13 @@ TEST(RefCountedUnitTest, TestSelfAssignment)
dsn::ref_ptr<SelfAssign> var(p);
var = var;
EXPECT_EQ(var.get(), p);
#if __clang__ && defined( __has_warning )
# if __has_warning( "-Wself-move" )
# define SUPPRESSING
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wself-move"
# endif
#endif
var = std::move(var);
EXPECT_EQ(var.get(), p);

2 changes: 1 addition & 1 deletion src/dist/block_service/local/local_service.cpp
Original file line number Diff line number Diff line change
@@ -246,7 +246,7 @@ local_file_object::local_file_object(local_service *local_svc, const std::string

local_file_object::~local_file_object()
{
// do nothing
_local_service = nullptr;
}

const std::string &local_file_object::get_md5sum() { return _md5_value; }
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ struct meta_storage
void delete_node_impl(std::string &&node, std::function<void()> &&cb, bool is_recursive);

private:
friend class operation;
friend struct operation;

dist::meta_state_service *_remote;
dsn::task_tracker *_tracker;

0 comments on commit 0043e1f

Please sign in to comment.