diff options
author | ngie <ngie@FreeBSD.org> | 2017-02-04 17:01:53 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-02-04 17:01:53 +0000 |
commit | 3c7a88851b0c7ec93184f316b7a79b19a9eae1c8 (patch) | |
tree | 9aaf3b262602a8d6a20fc4f4e89be89b3916d2e7 /tests/sys | |
parent | 64d4c7eb11920dc2726b2bed4ac14391c4a032f1 (diff) | |
download | FreeBSD-src-3c7a88851b0c7ec93184f316b7a79b19a9eae1c8.zip FreeBSD-src-3c7a88851b0c7ec93184f316b7a79b19a9eae1c8.tar.gz |
MFC r312120:
Fix warnings
- Staticize test_num
- Promote i to size_t to deal with -Wsign-compare issues
Tested with: clang, gcc, gcc49
Diffstat (limited to 'tests/sys')
-rw-r--r-- | tests/sys/mac/bsdextended/ugidfw_test.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/sys/mac/bsdextended/ugidfw_test.c b/tests/sys/mac/bsdextended/ugidfw_test.c index 071b4ec..57a283b 100644 --- a/tests/sys/mac/bsdextended/ugidfw_test.c +++ b/tests/sys/mac/bsdextended/ugidfw_test.c @@ -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); |