diff options
-rw-r--r-- | tools/regression/lib/libutil/test-grp.c | 2 | ||||
-rw-r--r-- | tools/regression/lib/libutil/test-trimdomain-nodomain.c | 7 | ||||
-rw-r--r-- | tools/regression/lib/libutil/test-trimdomain.c | 7 |
3 files changed, 9 insertions, 7 deletions
diff --git a/tools/regression/lib/libutil/test-grp.c b/tools/regression/lib/libutil/test-grp.c index 722a0b8..ae7ce73 100644 --- a/tools/regression/lib/libutil/test-grp.c +++ b/tools/regression/lib/libutil/test-grp.c @@ -64,7 +64,7 @@ build_grp(struct group *grp) int -main(int argc, char **argv) +main(void) { char *strGrp; int testNdx; diff --git a/tools/regression/lib/libutil/test-trimdomain-nodomain.c b/tools/regression/lib/libutil/test-trimdomain-nodomain.c index 344bc17..c02ccdb 100644 --- a/tools/regression/lib/libutil/test-trimdomain-nodomain.c +++ b/tools/regression/lib/libutil/test-trimdomain-nodomain.c @@ -47,7 +47,8 @@ int tests = 0; * This makes the tests much easier to write and less likely to fail on * oddly configured systems. */ -int gethostname(char *name, size_t namelen) +int +gethostname(char *name, size_t namelen) { if (strlcpy(name, TESTFQDN, namelen) > namelen) { errno = ENAMETOOLONG; @@ -63,7 +64,7 @@ testit(const char *input, int hostsize, const char *output, const char *test) const char *expected = (output == NULL) ? input : output; testhost = strdup(input); - trimdomain(testhost, hostsize < 0 ? strlen(testhost) : hostsize); + trimdomain(testhost, hostsize < 0 ? (int)strlen(testhost) : hostsize); tests++; if (strcmp(testhost, expected) != 0) { printf("not ok %d - %s\n", tests, test); @@ -75,7 +76,7 @@ testit(const char *input, int hostsize, const char *output, const char *test) } int -main (int argc, char **argv) +main(void) { printf("1..5\n"); diff --git a/tools/regression/lib/libutil/test-trimdomain.c b/tools/regression/lib/libutil/test-trimdomain.c index d1c7823..08fcfc0 100644 --- a/tools/regression/lib/libutil/test-trimdomain.c +++ b/tools/regression/lib/libutil/test-trimdomain.c @@ -47,7 +47,8 @@ int tests = 0; * This makes the tests much easier to write and less likely to fail on * oddly configured systems. */ -int gethostname(char *name, size_t namelen) +int +gethostname(char *name, size_t namelen) { if (strlcpy(name, TESTFQDN, namelen) > namelen) { errno = ENAMETOOLONG; @@ -63,7 +64,7 @@ testit(const char *input, int hostsize, const char *output, const char *test) const char *expected = (output == NULL) ? input : output; testhost = strdup(input); - trimdomain(testhost, hostsize < 0 ? strlen(testhost) : hostsize); + trimdomain(testhost, hostsize < 0 ? (int)strlen(testhost) : hostsize); tests++; if (strcmp(testhost, expected) != 0) { printf("not ok %d - %s\n", tests, test); @@ -75,7 +76,7 @@ testit(const char *input, int hostsize, const char *output, const char *test) } int -main (int argc, char **argv) +main(void) { printf("1..5\n"); |