diff options
author | Frédéric Bérat <fberat@redhat.com> | 2023-06-01 16:27:47 +0200 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-06-01 13:01:32 -0400 |
commit | 29e25f6f136182fb3756d51e03dea7c4d1919dd9 (patch) | |
tree | 4d3950068c9fec569ae21055641b986632371fbb /posix/tst-nice.c | |
parent | a952fcda58cd7aa191140fc9e7d453df212b9117 (diff) | |
download | glibc-29e25f6f136182fb3756d51e03dea7c4d1919dd9.zip glibc-29e25f6f136182fb3756d51e03dea7c4d1919dd9.tar.gz glibc-29e25f6f136182fb3756d51e03dea7c4d1919dd9.tar.bz2 |
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 'posix/tst-nice.c')
-rw-r--r-- | posix/tst-nice.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/posix/tst-nice.c b/posix/tst-nice.c index fe9888b..59cf953 100644 --- a/posix/tst-nice.c +++ b/posix/tst-nice.c @@ -58,8 +58,7 @@ do_test (void) /* BZ #18086. Make sure we don't reset errno. */ errno = EBADF; - nice (0); - if (errno != EBADF) + if (nice (0) == -1 || errno != EBADF) { printf ("FAIL: errno = %i, but wanted EBADF (%i)\n", errno, EBADF); return 1; |