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 --- sysdeps/pthread/tst-flock1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/pthread/tst-flock1.c') diff --git a/sysdeps/pthread/tst-flock1.c b/sysdeps/pthread/tst-flock1.c index 7eef9070ab..9de148afd3 100644 --- a/sysdeps/pthread/tst-flock1.c +++ b/sysdeps/pthread/tst-flock1.c @@ -21,6 +21,7 @@ #include #include +#include static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; @@ -56,7 +57,7 @@ do_test (void) unlink (tmp); - write (fd, "foobar xyzzy", 12); + xwrite (fd, "foobar xyzzy", 12); if (flock (fd, LOCK_EX | LOCK_NB) != 0) { -- cgit 1.4.1