mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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>
This commit is contained in:
committed by
Siddhesh Poyarekar
parent
a952fcda58
commit
29e25f6f13
@ -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);
|
||||
|
||||
|
@ -1009,7 +1009,8 @@ tf_pread (void *arg)
|
||||
pthread_cleanup_push (cl, NULL);
|
||||
|
||||
char mem[10];
|
||||
pread (tempfd, mem, sizeof (mem), 0);
|
||||
if (pread (tempfd, mem, sizeof (mem), 0) < 0)
|
||||
FAIL_EXIT1 ("pread failed: %m");
|
||||
|
||||
pthread_cleanup_pop (0);
|
||||
|
||||
@ -1038,7 +1039,8 @@ tf_pwrite (void *arg)
|
||||
pthread_cleanup_push (cl, NULL);
|
||||
|
||||
char mem[10];
|
||||
pwrite (tempfd, mem, sizeof (mem), 0);
|
||||
if (pwrite (tempfd, mem, sizeof (mem), 0) <0)
|
||||
FAIL_EXIT1 ("pwrite failed: %m");
|
||||
|
||||
pthread_cleanup_pop (0);
|
||||
|
||||
|
Reference in New Issue
Block a user