From c0c09cac2138e9a60120726a30300a292b1d290d Mon Sep 17 00:00:00 2001 From: ngie Date: Sun, 28 May 2017 04:04:32 +0000 Subject: [PATCH] getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings MFC after: 3 days Sponsored by: Dell EMC Isilon --- lib/libc/tests/nss/getrpc_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/tests/nss/getrpc_test.c b/lib/libc/tests/nss/getrpc_test.c index 231b38e3ef12..aacf8833c26f 100644 --- a/lib/libc/tests/nss/getrpc_test.c +++ b/lib/libc/tests/nss/getrpc_test.c @@ -173,16 +173,16 @@ sdump_rpcent(struct rpcent *rpc, char *buffer, size_t buflen) written = snprintf(buffer, buflen, "%s %d", rpc->r_name, rpc->r_number); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (rpc->r_aliases != NULL) { if (*(rpc->r_aliases) != '\0') { for (cp = rpc->r_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -400,7 +400,7 @@ rpcent_test_getrpcent(struct rpcent *rpc, void *mdata) return (rpcent_test_correctness(rpc, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct rpcent_test_data td, td_snap, td_2pass;