From 026a84a54d3b6c23b999b793e2a6f8ecd211e3b8 Mon Sep 17 00:00:00 2001 From: Frédéric Bérat Date: Thu, 1 Jun 2023 12:40:05 -0400 Subject: tests: replace write by xwrite Using write without cheks leads to warn unused result when __wur is enabled. Reviewed-by: Siddhesh Poyarekar --- rt/tst-cputimer1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rt/tst-cputimer1.c') diff --git a/rt/tst-cputimer1.c b/rt/tst-cputimer1.c index 8f5dd76cf2..18d8b195a2 100644 --- a/rt/tst-cputimer1.c +++ b/rt/tst-cputimer1.c @@ -11,6 +11,8 @@ #include #include +#include + #define TEST_CLOCK CLOCK_PROCESS_CPUTIME_ID #define TEST_CLOCK_MISSING(clock) \ (setup_test () ? "process CPU clock timer support" : NULL) @@ -29,7 +31,7 @@ chew_cpu (void *arg) for (int i = 0; i < 100; ++i) for (size_t j = 0; j < sizeof buf; ++j) buf[j] = 0xbb; - write (nullfd, (char *) buf, sizeof buf); + xwrite (nullfd, (char *) buf, sizeof buf); close (nullfd); } -- cgit 1.4.1