From owner-svn-src-stable-10@freebsd.org Sat Feb 4 16:15:27 2017 Return-Path: Delivered-To: svn-src-stable-10@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 A22EECD0342; Sat, 4 Feb 2017 16:15:27 +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 7149CB9B; Sat, 4 Feb 2017 16:15:27 +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 v14GFQph062012; Sat, 4 Feb 2017 16:15:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GFQHN062011; Sat, 4 Feb 2017 16:15:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041615.v14GFQHN062011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313216 - stable/10/tests/sys/mac/bsdextended X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:15:27 -0000 Author: ngie Date: Sat Feb 4 16:15:26 2017 New Revision: 313216 URL: https://svnweb.freebsd.org/changeset/base/313216 Log: MFC r312120: Fix warnings - Staticize test_num - Promote i to size_t to deal with -Wsign-compare issues Tested with: clang, gcc, gcc49 Modified: stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:09:07 2017 (r313215) +++ stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:15:26 2017 (r313216) @@ -71,7 +71,7 @@ static const char *test_groups[] = { "bin", }; -int test_num; +static int test_num; /* * List of test strings that must go in (and come out) of libugidfw intact. @@ -149,7 +149,8 @@ test_libugidfw_strings(void) struct mac_bsdextended_rule rule; char errorstr[256]; char rulestr[256]; - int error, i; + size_t i; + int error; for (i = 0; i < nitems(test_users); i++, test_num++) { if (getpwnam(test_users[i]) == NULL) @@ -171,7 +172,7 @@ test_libugidfw_strings(void) error = bsde_parse_rule_string(test_strings[i], &rule, sizeof(errorstr), errorstr); if (error == -1) - printf("not ok %d # bsde_parse_rule_string: '%s' (%d) " + printf("not ok %d # bsde_parse_rule_string: '%s' (%zu) " "failed: %s\n", test_num, test_strings[i], i, errorstr); else printf("ok %d\n", test_num);