diff options
author | des <des@FreeBSD.org> | 2009-11-12 01:33:57 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2009-11-12 01:33:57 +0000 |
commit | dac4404df763635c64ceffd57978fee7b51246b5 (patch) | |
tree | 2e2cf5a834c60df8fd372a5df494cc53daf0e272 /tools/regression/lib | |
parent | 4c72e3a87ca87a76e37a5079f2f11b785f6d8348 (diff) | |
download | FreeBSD-src-dac4404df763635c64ceffd57978fee7b51246b5.zip FreeBSD-src-dac4404df763635c64ceffd57978fee7b51246b5.tar.gz |
Fix warnings
Diffstat (limited to 'tools/regression/lib')
-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"); |