Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelronstrom committed Nov 14, 2024
1 parent 59849db commit 6df271b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pink/src/pink_pubsub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand All @@ -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_;
Expand Down

0 comments on commit 6df271b

Please sign in to comment.