freebsd-dev/lib/libc/tests/resolv
Kyle Evans 5593499d4a libc/resolv: attempt to fix the test under WARNS=6
In a side-change that I'm working on to start defaulting src builds to
WARNS=6 where WARNS isn't otherwise specified, GCC6 (and clang, to a lesser
extent) pointed out a number of issues with the resolv tests:

- Global method variable that gets shadowed in run_tests()
- Signed/unsigned comparison between i in run_tests() and hosts->sl_cur

The shadowed variable looks like it might actually be bogus as written, as
we pass it to RUN_TESTS -> run_tests, but other parts use the global method
instead. This change is mainly geared towards correcting that by removing
the global and plumbing the method through from run_tests -> run into the
new thread.

For the signed/unsigned comparison, there's no compelling reason to not just
switch i/nthreads/nhosts to size_t.

The review also included a change to the load() function that was better
addressed by jhb in r365302.

Reviewed by:	ngie, pstef
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D24844
2020-09-09 02:42:21 +00:00
..
mach
Makefile Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
resolv_test.c libc/resolv: attempt to fix the test under WARNS=6 2020-09-09 02:42:21 +00:00