Skip to content

Commit

Permalink
treewide: explicitly ignore write/read results in specific areas
Browse files Browse the repository at this point in the history
  • Loading branch information
ballard26 committed Oct 3, 2024
1 parent cdb6c0e commit e296255
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/core/reactor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3007,7 +3007,7 @@ reactor::wakeup() {
_sleeping.store(false, std::memory_order_relaxed);

uint64_t one = 1;
::write(_notify_eventfd.get(), &one, sizeof(one));
(void)::write(_notify_eventfd.get(), &one, sizeof(one));
}

void reactor::start_aio_eventfd_loop() {
Expand All @@ -3017,7 +3017,7 @@ void reactor::start_aio_eventfd_loop() {
future<> loop_done = repeat([this] {
return _aio_eventfd->readable().then([this] {
char garbage[8];
::read(_aio_eventfd->get_fd(), garbage, 8); // totally uninteresting
(void)::read(_aio_eventfd->get_fd(), garbage, 8); // totally uninteresting
return _stopping ? stop_iteration::yes : stop_iteration::no;
});
});
Expand All @@ -3032,7 +3032,7 @@ void reactor::stop_aio_eventfd_loop() {
return;
}
uint64_t one = 1;
::write(_aio_eventfd->get_fd(), &one, 8);
(void)::write(_aio_eventfd->get_fd(), &one, 8);
}

inline
Expand Down
2 changes: 1 addition & 1 deletion src/core/thread_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void thread_pool::work(sstring name) {
std::atomic_thread_fence(std::memory_order_seq_cst);
if (_main_thread_idle.load(std::memory_order_relaxed)) {
uint64_t one = 1;
::write(_reactor._notify_eventfd.get(), &one, 8);
(void)::write(_reactor._notify_eventfd.get(), &one, 8);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/perf/linux_perf_event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ linux_perf_event::read() {
return 0;
}
uint64_t ret;
::read(_fd, &ret, sizeof(ret));
(void)::read(_fd, &ret, sizeof(ret));
return ret;
}

Expand Down

0 comments on commit e296255

Please sign in to comment.