Skip to content

Commit 556551e

Browse files
committed
Test return value of write to avoid errors/warnings
1 parent 6a92b9c commit 556551e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/watchpoint_unaligned2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ int main(void) {
1414

1515
// This will fail; we just want the compiler to not optimize out
1616
// the store.
17-
write(STDIN_FILENO, &value, sizeof(value));
17+
test_assert(-1 == write(-1, &value, sizeof(value)));
1818

1919
atomic_puts("EXIT-SUCCESS");
2020
return 0;

0 commit comments

Comments
 (0)