From owner-svn-src-all@freebsd.org Sun May 28 05:26:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5771D85843; Sun, 28 May 2017 05:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DBC2112; Sun, 28 May 2017 05:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S5QjmR014493; Sun, 28 May 2017 05:26:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S5Qjjs014492; Sun, 28 May 2017 05:26:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280526.v4S5Qjjs014492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 05:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319045 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 05:26:46 -0000 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; }