svn commit: r319036 - head/lib/libc/tests/nss

Ngie Cooper ngie at FreeBSD.org
Sun May 28 04:05:20 UTC 2017


Author: ngie
Date: Sun May 28 04:05:19 2017
New Revision: 319036
URL: https://svnweb.freebsd.org/changeset/base/319036

Log:
  getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings
  
  MFC after:	3 days
  Sponsored by:	Dell EMC Isilon

Modified:
  head/lib/libc/tests/nss/getproto_test.c

Modified: head/lib/libc/tests/nss/getproto_test.c
==============================================================================
--- head/lib/libc/tests/nss/getproto_test.c	Sun May 28 04:04:32 2017	(r319035)
+++ head/lib/libc/tests/nss/getproto_test.c	Sun May 28 04:05:19 2017	(r319036)
@@ -172,16 +172,16 @@ sdump_protoent(struct protoent *pe, char
 	written = snprintf(buffer, buflen, "%s %d",
 		pe->p_name, pe->p_proto);
 	buffer += written;
-	if (written > buflen)
+	if (written > (int)buflen)
 		return;
 	buflen -= written;
 
 	if (pe->p_aliases != NULL) {
 		if (*(pe->p_aliases) != '\0') {
 			for (cp = pe->p_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;
 
@@ -395,7 +395,7 @@ protoent_test_getprotoent(struct protoen
 	return (protoent_test_correctness(pe, NULL));
 }
 
-int
+static int
 run_tests(const char *snapshot_file, enum test_methods method)
 {
 	struct protoent_test_data td, td_snap, td_2pass;


More information about the svn-src-all mailing list