summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2025-12-24 17:53:35 +0900
committerYusuke Endoh <mame@ruby-lang.org>2025-12-24 21:09:33 +0900
commit2d0d95305c0973c0a8966a07fa029c55e27f94cd (patch)
treeee1b139b90bba8688149d64bdf7f3209346f7527 /ext
parentdf1c9a06ac42871519a05d53fd6909567cc4531f (diff)
ext/-test-/scheduler/scheduler.c: explicitly ignore the result of write
``` scheduler.c:44:5: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 44 | write(blocking_state->notify_descriptor, "x", 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
Diffstat (limited to 'ext')
-rw-r--r--ext/-test-/scheduler/scheduler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/-test-/scheduler/scheduler.c b/ext/-test-/scheduler/scheduler.c
index f8384f597e..b742a5573b 100644
--- a/ext/-test-/scheduler/scheduler.c
+++ b/ext/-test-/scheduler/scheduler.c
@@ -41,7 +41,8 @@ blocking_operation(void *argument)
{
struct blocking_state *blocking_state = (struct blocking_state *)argument;
- write(blocking_state->notify_descriptor, "x", 1);
+ ssize_t ret = write(blocking_state->notify_descriptor, "x", 1);
+ (void)ret; // ignore the result for now
while (!blocking_state->interrupted) {
struct timeval tv = {1, 0}; // 1 second timeout.