Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 May 2017 04:05:19 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319036 - head/lib/libc/tests/nss
Message-ID:  <201705280405.v4S45J8o081638@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705280405.v4S45J8o081638>