mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +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
@@ -29,12 +29,17 @@ do_test (void)
|
||||
printf("checking sscanf\n");
|
||||
|
||||
int i, j, n;
|
||||
int result = 0;
|
||||
|
||||
i = j = n = 0;
|
||||
FSCANF (fp, L(" %i - %i %n"), &i, &j, &n);
|
||||
if (FSCANF (fp, L(" %i - %i %n"), &i, &j, &n) < 2)
|
||||
{
|
||||
printf ("FSCANF couldn't read all parameters %d\n", errno);
|
||||
result = 1;
|
||||
}
|
||||
|
||||
printf ("found %i-%i (length=%i)\n", i, j, n);
|
||||
|
||||
int result = 0;
|
||||
if (i != 7)
|
||||
{
|
||||
printf ("i is %d, expected 7\n", i);
|
||||
|
Reference in New Issue
Block a user