svn commit: r199211 - head/tools/regression/lib/libutil
Dag-Erling Smorgrav
des at FreeBSD.org
Thu Nov 12 01:33:58 UTC 2009
Author: des
Date: Thu Nov 12 01:33:57 2009
New Revision: 199211
URL: http://svn.freebsd.org/changeset/base/199211
Log:
Fix warnings
Modified:
head/tools/regression/lib/libutil/test-grp.c
head/tools/regression/lib/libutil/test-trimdomain-nodomain.c
head/tools/regression/lib/libutil/test-trimdomain.c
Modified: head/tools/regression/lib/libutil/test-grp.c
==============================================================================
--- head/tools/regression/lib/libutil/test-grp.c Thu Nov 12 01:30:17 2009 (r199210)
+++ head/tools/regression/lib/libutil/test-grp.c Thu Nov 12 01:33:57 2009 (r199211)
@@ -64,7 +64,7 @@ build_grp(struct group *grp)
int
-main(int argc, char **argv)
+main(void)
{
char *strGrp;
int testNdx;
Modified: head/tools/regression/lib/libutil/test-trimdomain-nodomain.c
==============================================================================
--- head/tools/regression/lib/libutil/test-trimdomain-nodomain.c Thu Nov 12 01:30:17 2009 (r199210)
+++ head/tools/regression/lib/libutil/test-trimdomain-nodomain.c Thu Nov 12 01:33:57 2009 (r199211)
@@ -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 *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,
}
int
-main (int argc, char **argv)
+main(void)
{
printf("1..5\n");
Modified: head/tools/regression/lib/libutil/test-trimdomain.c
==============================================================================
--- head/tools/regression/lib/libutil/test-trimdomain.c Thu Nov 12 01:30:17 2009 (r199210)
+++ head/tools/regression/lib/libutil/test-trimdomain.c Thu Nov 12 01:33:57 2009 (r199211)
@@ -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 *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,
}
int
-main (int argc, char **argv)
+main(void)
{
printf("1..5\n");
More information about the svn-src-all
mailing list