about summary refs log tree commit diff
path: root/sysdeps/pthread/tst-cancel16.c
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-06-01 16:27:47 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-06-01 13:01:32 -0400
commit29e25f6f136182fb3756d51e03dea7c4d1919dd9 (patch)
tree4d3950068c9fec569ae21055641b986632371fbb /sysdeps/pthread/tst-cancel16.c
parenta952fcda58cd7aa191140fc9e7d453df212b9117 (diff)
downloadglibc-29e25f6f136182fb3756d51e03dea7c4d1919dd9.tar.gz
glibc-29e25f6f136182fb3756d51e03dea7c4d1919dd9.tar.xz
glibc-29e25f6f136182fb3756d51e03dea7c4d1919dd9.zip
tests: fix warn unused results
With fortification enabled, few function calls return result need to be
checked, has they get the __wur macro enabled.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/pthread/tst-cancel16.c')
-rw-r--r--sysdeps/pthread/tst-cancel16.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/pthread/tst-cancel16.c b/sysdeps/pthread/tst-cancel16.c
index 511b9e1e91..d47c7c68cb 100644
--- a/sysdeps/pthread/tst-cancel16.c
+++ b/sysdeps/pthread/tst-cancel16.c
@@ -50,7 +50,11 @@ tf (void *arg)
   pthread_cleanup_push (cl, NULL);
 
   /* This call should never return.  */
-  (void) lockf (fd, F_LOCK, 0);
+  if (lockf (fd, F_LOCK, 0))
+    {
+      puts ("child thread: lockf failed");
+      exit (1);
+    }
 
   pthread_cleanup_pop (0);