svn commit: r319045 - head/lib/libc/tests/nss

Ngie Cooper ngie at FreeBSD.org
Sun May 28 05:26:46 UTC 2017


Author: ngie
Date: Sun May 28 05:26:45 2017
New Revision: 319045
URL: https://svnweb.freebsd.org/changeset/base/319045

Log:
  Fix -Wunused and -Wshadow warnings
  
  MFC after:	3 days
  Sponsored by:	Dell EMC Isilon

Modified:
  head/lib/libc/tests/nss/gethostby_test.c

Modified: head/lib/libc/tests/nss/gethostby_test.c
==============================================================================
--- head/lib/libc/tests/nss/gethostby_test.c	Sun May 28 04:43:02 2017	(r319044)
+++ head/lib/libc/tests/nss/gethostby_test.c	Sun May 28 05:26:45 2017	(r319045)
@@ -87,8 +87,6 @@ static int hostent_test_gethostbyaddr(st
 static int hostent_test_getaddrinfo_eq(struct hostent *, void *);
 static int hostent_test_getnameinfo_eq(struct hostent *, void *);
 
-static void usage(void)  __attribute__((__noreturn__));
-
 IMPLEMENT_TEST_DATA(hostent)
 IMPLEMENT_TEST_FILE_SNAPSHOT(hostent)
 IMPLEMENT_1PASS_TEST(hostent)
@@ -677,7 +675,7 @@ dump_hostent(struct hostent *result)
 }
 
 static int
-hostent_test_correctness(struct hostent *ht, void *mdata)
+hostent_test_correctness(struct hostent *ht, void *mdata __unused)
 {
 
 #ifdef DEBUG
@@ -760,7 +758,7 @@ hostent_test_gethostbyaddr(struct hosten
 }
 
 static int
-hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata)
+hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata __unused)
 {
 	struct addrinfo *ai, hints;
 	int rv;
@@ -799,7 +797,7 @@ hostent_test_getaddrinfo_eq(struct hoste
 }
 
 static int
-hostent_test_getnameinfo_eq(struct hostent *he, void *mdata)
+hostent_test_getnameinfo_eq(struct hostent *he, void *mdata __unused)
 {
 	char **cp;
 	char buffer[NI_MAXHOST];
@@ -923,14 +921,14 @@ hostent_test_getnameinfo_eq(struct hoste
 }
 
 static int
-run_tests(const char *hostlist_file, const char *snapshot_file, int af_type,
+run_tests(const char *hostlist_file, const char *snapshot_file, int _af_type,
     enum test_methods method, bool use_ipv6_mapping)
 {
 	struct hostent_test_data td, td_addr, td_snap;
 	res_state statp;
 	int rv = -2;
 
-	switch (af_type) {
+	switch (_af_type) {
 	case AF_INET:
 		ATF_REQUIRE_FEATURE("inet");
 		ATF_REQUIRE(!use_ipv6_mapping);
@@ -939,7 +937,7 @@ run_tests(const char *hostlist_file, con
 		ATF_REQUIRE_FEATURE("inet6");
 		break;
 	default:
-		atf_tc_fail("unhandled address family: %d", af_type);
+		atf_tc_fail("unhandled address family: %d", _af_type);
 		break;
 	}
 


More information about the svn-src-all mailing list