1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Fix warnings in fwscanf / rewind tests.

This patch fixes "set but not used" warnings in the tests
libio/bug-rewind.c and libio/bug-rewind2.c by checking the return
values from fwscanf and making the tests fail if those values aren't
as expected.

Tested for x86_64.

	* libio/bug-rewind.c (do_test): Check fwscanf return values.
	* libio/bug-rewind2.c (do_test): Likewise.
This commit is contained in:
Joseph Myers
2014-11-26 12:54:39 +00:00
parent bd5dadac87
commit 12da14a591
3 changed files with 18 additions and 0 deletions

View File

@ -45,6 +45,11 @@ do_test (void)
rewind (fp);
ret = fwscanf (fp, L"%c", dummy);
if (ret != 1)
{
printf ("fwscanf returned %d, expected 1\n", ret);
result = 1;
}
printf ("current pos = %ld\n", ftell (fp));
if (ftell (fp) != 1)