svn commit: r319033 - head/lib/libc/tests/nss
Ngie Cooper
ngie at FreeBSD.org
Sun May 28 04:03:08 UTC 2017
Author: ngie
Date: Sun May 28 04:03:06 2017
New Revision: 319033
URL: https://svnweb.freebsd.org/changeset/base/319033
Log:
getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
Modified:
head/lib/libc/tests/nss/getserv_test.c
Modified: head/lib/libc/tests/nss/getserv_test.c
==============================================================================
--- head/lib/libc/tests/nss/getserv_test.c Sun May 28 03:59:33 2017 (r319032)
+++ head/lib/libc/tests/nss/getserv_test.c Sun May 28 04:03:06 2017 (r319033)
@@ -177,16 +177,16 @@ sdump_servent(struct servent *serv, char
written = snprintf(buffer, buflen, "%s %d %s",
serv->s_name, ntohs(serv->s_port), serv->s_proto);
buffer += written;
- if (written > buflen)
+ if (written > (int)buflen)
return;
buflen -= written;
if (serv->s_aliases != NULL) {
if (*(serv->s_aliases) != '\0') {
for (cp = serv->s_aliases; *cp; ++cp) {
- written = snprintf(buffer, buflen, " %s",*cp);
+ written = snprintf(buffer, buflen, " %s", *cp);
buffer += written;
- if (written > buflen)
+ if (written > (int)buflen)
return;
buflen -= written;
@@ -410,7 +410,7 @@ servent_test_getservent(struct servent *
return (servent_test_correctness(serv, NULL));
}
-int
+static int
run_tests(const char *snapshot_file, enum test_methods method)
{
struct servent_test_data td, td_snap, td_2pass;
More information about the svn-src-head
mailing list