Clean up warnings in pthread tests
I intend to move these into lib/libthr/tests/ and connect to kyua. This
is a first step to address warnings emitted when building using standard
make infrastructure.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34306
(cherry picked from commit ef135466f81bc3f203efa77d1eb81132f7646196)
(cherry picked from commit 7bfe5e45153b3d214cdb09ced8fccdef02337369)
(cherry picked from commit 2e545745ce2ecbe966434fa5edc9b60d82b43c17)