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 --- time/tst-cpuclock1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'time') diff --git a/time/tst-cpuclock1.c b/time/tst-cpuclock1.c index 6f2e70a58a..6a793e06df 100644 --- a/time/tst-cpuclock1.c +++ b/time/tst-cpuclock1.c @@ -27,6 +27,8 @@ #include #include +#include + /* This function is intended to rack up both user and system time. */ static void chew_cpu (void) @@ -41,7 +43,7 @@ chew_cpu (void) 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); if (getppid () == 1) _exit (2); -- cgit 1.4.1