From owner-svn-src-all@freebsd.org Sun May 28 04:05:20 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 C11C2D85E65; Sun, 28 May 2017 04:05:20 +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 933721364; Sun, 28 May 2017 04:05:20 +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 v4S45JFZ081639; Sun, 28 May 2017 04:05:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S45J8o081638; Sun, 28 May 2017 04:05:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280405.v4S45J8o081638@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 04:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319036 - 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 04:05:20 -0000 Author: ngie Date: Sun May 28 04:05:19 2017 New Revision: 319036 URL: https://svnweb.freebsd.org/changeset/base/319036 Log: getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getproto_test.c Modified: head/lib/libc/tests/nss/getproto_test.c ============================================================================== --- head/lib/libc/tests/nss/getproto_test.c Sun May 28 04:04:32 2017 (r319035) +++ head/lib/libc/tests/nss/getproto_test.c Sun May 28 04:05:19 2017 (r319036) @@ -172,16 +172,16 @@ sdump_protoent(struct protoent *pe, char written = snprintf(buffer, buflen, "%s %d", pe->p_name, pe->p_proto); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (pe->p_aliases != NULL) { if (*(pe->p_aliases) != '\0') { for (cp = pe->p_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; @@ -395,7 +395,7 @@ protoent_test_getprotoent(struct protoen return (protoent_test_correctness(pe, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct protoent_test_data td, td_snap, td_2pass;