Skip to content

Commit 2d0d953

Browse files
committed
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); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
1 parent df1c9a0 commit 2d0d953

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/-test-/scheduler/scheduler.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ blocking_operation(void *argument)
4141
{
4242
struct blocking_state *blocking_state = (struct blocking_state *)argument;
4343

44-
write(blocking_state->notify_descriptor, "x", 1);
44+
ssize_t ret = write(blocking_state->notify_descriptor, "x", 1);
45+
(void)ret; // ignore the result for now
4546

4647
while (!blocking_state->interrupted) {
4748
struct timeval tv = {1, 0}; // 1 second timeout.

0 commit comments

Comments
 (0)