@@ -141,7 +141,8 @@ int PubSubThread::Publish(const std::string& channel, const std::string &msg) {
141
141
channel_ = channel;
142
142
message_ = msg;
143
143
// Send signal to ThreadMain()
144
- (void )write (msg_pfd_[1 ], " " , 1 );
144
+ int ret_code = write (msg_pfd_[1 ], " " , 1 );
145
+ (void )ret_code;
145
146
receiver_mutex_.Lock ();
146
147
while (receivers_ == -1 ) {
147
148
receiver_rsignal_.Wait ();
@@ -384,7 +385,8 @@ void *PubSubThread::ThreadMain() {
384
385
pfe = (pink_epoll_->firedevent ()) + i;
385
386
if (pfe->fd == pink_epoll_->notify_receive_fd ()) { // New connection comming
386
387
if (pfe->mask & PinkEpoll::kRead ) {
387
- (void )read (pink_epoll_->notify_receive_fd (), triger, 1 );
388
+ int ret_code = read (pink_epoll_->notify_receive_fd (), triger, 1 );
389
+ (void )ret_code;
388
390
{
389
391
PinkItem ti = pink_epoll_->notify_queue_pop ();
390
392
if (ti.notify_type () == kNotiClose ) {
@@ -404,7 +406,8 @@ void *PubSubThread::ThreadMain() {
404
406
}
405
407
if (pfe->fd == msg_pfd_[0 ]) { // Publish message
406
408
if (pfe->mask & PinkEpoll::kRead ) {
407
- (void )read (msg_pfd_[0 ], triger, 1 );
409
+ int ret_code = read (msg_pfd_[0 ], triger, 1 );
410
+ (void )ret_code;
408
411
std::string channel, msg;
409
412
int32_t receivers = 0 ;
410
413
channel = channel_;
0 commit comments