diff --git a/pink/src/pink_pubsub.cc b/pink/src/pink_pubsub.cc index 16326cd..f6ae51b 100644 --- a/pink/src/pink_pubsub.cc +++ b/pink/src/pink_pubsub.cc @@ -141,7 +141,8 @@ int PubSubThread::Publish(const std::string& channel, const std::string &msg) { channel_ = channel; message_ = msg; // Send signal to ThreadMain() - (void)write(msg_pfd_[1], "", 1); + int ret_code = write(msg_pfd_[1], "", 1); + (void)ret_code; receiver_mutex_.Lock(); while (receivers_ == -1) { receiver_rsignal_.Wait(); @@ -384,7 +385,8 @@ void *PubSubThread::ThreadMain() { pfe = (pink_epoll_->firedevent()) + i; if (pfe->fd == pink_epoll_->notify_receive_fd()) { // New connection comming if (pfe->mask & PinkEpoll::kRead) { - (void)read(pink_epoll_->notify_receive_fd(), triger, 1); + int ret_code = read(pink_epoll_->notify_receive_fd(), triger, 1); + (void)ret_code; { PinkItem ti = pink_epoll_->notify_queue_pop(); if (ti.notify_type() == kNotiClose) { @@ -404,7 +406,8 @@ void *PubSubThread::ThreadMain() { } if (pfe->fd == msg_pfd_[0]) { // Publish message if (pfe->mask & PinkEpoll::kRead) { - (void)read(msg_pfd_[0], triger, 1); + int ret_code = read(msg_pfd_[0], triger, 1); + (void)ret_code; std::string channel, msg; int32_t receivers = 0; channel = channel_;