Fix -Wunused and -Wshadow warnings
MFC after: 3 days Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
91c53523fd
commit
981aa50fc2
@ -87,8 +87,6 @@ static int hostent_test_gethostbyaddr(struct hostent *, void *);
|
|||||||
static int hostent_test_getaddrinfo_eq(struct hostent *, void *);
|
static int hostent_test_getaddrinfo_eq(struct hostent *, void *);
|
||||||
static int hostent_test_getnameinfo_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_DATA(hostent)
|
||||||
IMPLEMENT_TEST_FILE_SNAPSHOT(hostent)
|
IMPLEMENT_TEST_FILE_SNAPSHOT(hostent)
|
||||||
IMPLEMENT_1PASS_TEST(hostent)
|
IMPLEMENT_1PASS_TEST(hostent)
|
||||||
@ -677,7 +675,7 @@ dump_hostent(struct hostent *result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hostent_test_correctness(struct hostent *ht, void *mdata)
|
hostent_test_correctness(struct hostent *ht, void *mdata __unused)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -760,7 +758,7 @@ hostent_test_gethostbyaddr(struct hostent *he, void *mdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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;
|
struct addrinfo *ai, hints;
|
||||||
int rv;
|
int rv;
|
||||||
@ -799,7 +797,7 @@ hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hostent_test_getnameinfo_eq(struct hostent *he, void *mdata)
|
hostent_test_getnameinfo_eq(struct hostent *he, void *mdata __unused)
|
||||||
{
|
{
|
||||||
char **cp;
|
char **cp;
|
||||||
char buffer[NI_MAXHOST];
|
char buffer[NI_MAXHOST];
|
||||||
@ -923,14 +921,14 @@ hostent_test_getnameinfo_eq(struct hostent *he, void *mdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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)
|
enum test_methods method, bool use_ipv6_mapping)
|
||||||
{
|
{
|
||||||
struct hostent_test_data td, td_addr, td_snap;
|
struct hostent_test_data td, td_addr, td_snap;
|
||||||
res_state statp;
|
res_state statp;
|
||||||
int rv = -2;
|
int rv = -2;
|
||||||
|
|
||||||
switch (af_type) {
|
switch (_af_type) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
ATF_REQUIRE_FEATURE("inet");
|
ATF_REQUIRE_FEATURE("inet");
|
||||||
ATF_REQUIRE(!use_ipv6_mapping);
|
ATF_REQUIRE(!use_ipv6_mapping);
|
||||||
@ -939,7 +937,7 @@ run_tests(const char *hostlist_file, const char *snapshot_file, int af_type,
|
|||||||
ATF_REQUIRE_FEATURE("inet6");
|
ATF_REQUIRE_FEATURE("inet6");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
atf_tc_fail("unhandled address family: %d", af_type);
|
atf_tc_fail("unhandled address family: %d", _af_type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user