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
@@ -7,16 +7,16 @@ main (void)
|
||||
int i;
|
||||
int lost = 0;
|
||||
|
||||
scanf ("%2s", buf);
|
||||
lost = (scanf ("%2s", buf) < 0);
|
||||
lost |= (buf[0] != 'X' || buf[1] != 'Y' || buf[2] != '\0');
|
||||
if (lost)
|
||||
puts ("test of %2s failed.");
|
||||
scanf (" ");
|
||||
scanf ("%d", &i);
|
||||
lost |= (scanf (" ") < 0);
|
||||
lost |= (scanf ("%d", &i) < 0);
|
||||
lost |= (i != 1234);
|
||||
if (lost)
|
||||
puts ("test of %d failed.");
|
||||
scanf ("%c", buf);
|
||||
lost |= (scanf ("%c", buf) < 0);
|
||||
lost |= (buf[0] != 'L');
|
||||
if (lost)
|
||||
puts ("test of %c failed.\n");
|
||||
|
Reference in New Issue
Block a user