mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix unused return result hack to work on macOS/GCC 7.4+
As of GCC 7.4 (at least under macOS 10.10), the previous workaround of casting a must-use result to `(void)` to avoid warnings about unused code no longer works. This workaround is uglier but it quiets these warnings.
This commit is contained in:
parent
60670999ad
commit
92401d8ebb
1 changed files with 2 additions and 1 deletions
|
@ -154,7 +154,8 @@ generation_list_t topic_monitor_t::await_gens(const generation_list_t &input_gen
|
|||
(void)select(fd + 1, &fds, nullptr, nullptr, nullptr /* timeout */);
|
||||
#endif
|
||||
uint8_t ignored[PIPE_BUF];
|
||||
(void)read(fd, ignored, sizeof ignored);
|
||||
auto unused = read(fd, ignored, sizeof ignored);
|
||||
if (unused) {}
|
||||
|
||||
// We are finished reading. We must stop being the reader, and post on the condition
|
||||
// variable to wake up any other threads waiting for us to finish reading.
|
||||
|
|
Loading…
Reference in a new issue