Skip to content

Commit

Permalink
[src] Do some trivial improvements about unused things
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigma711 committed Aug 30, 2023
1 parent faa14ec commit 9a957fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ Logger::Logger()
wrote_index_(-1L),
log_file_(NULL),
time_now_sec_(0),
write_index_(0L) {}
write_index_(0L) {
(void)filler1_;
(void)filler2_;
(void)filler3_;
(void)filler4_;
}

Logger::~Logger() {
if (thread_.joinable()) {
Expand Down
3 changes: 1 addition & 2 deletions src/rpc_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ RpcSyncChannel::RpcSyncChannel(const NetAddress& server_address)
this->OnRpcMessage(sock_fd, rpc_message, receive_time);
}),
socket_fd_(::socket(server_address.GetFamily(),
SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP)),
services_(nullptr) {
SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP)) {
LOG_INFO("RpcSyncChannel::RpcSyncChannel - %p", this);
if (socket_fd_ < 0) {
LOG_ERROR("Fail to initialize for the socket fd of new RpcSyncChannel!!!");
Expand Down
3 changes: 0 additions & 3 deletions src/rpc_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ class RpcSyncChannel : public ::google::protobuf::RpcChannel {

MutexLock outstanding_calls_lock_;
std::unordered_map<int64_t, OutstandingCall> outstanding_calls_;

const std::unordered_map<std::string, ::google::protobuf::Service*>*
services_;
};

} // namespace taotu
Expand Down

0 comments on commit 9a957fb

Please sign in to comment.