Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 May 2017 04:04:32 +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: r319035 - head/lib/libc/tests/nss
Message-ID:  <201705280404.v4S44Wjr081550@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sun May 28 04:04:32 2017
New Revision: 319035
URL: https://svnweb.freebsd.org/changeset/base/319035

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

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

Modified: head/lib/libc/tests/nss/getrpc_test.c
==============================================================================
--- head/lib/libc/tests/nss/getrpc_test.c	Sun May 28 04:03:45 2017	(r319034)
+++ head/lib/libc/tests/nss/getrpc_test.c	Sun May 28 04:04:32 2017	(r319035)
@@ -173,16 +173,16 @@ sdump_rpcent(struct rpcent *rpc, char *b
 	written = snprintf(buffer, buflen, "%s %d",
 		rpc->r_name, rpc->r_number);
 	buffer += written;
-	if (written > buflen)
+	if (written > (int)buflen)
 		return;
 	buflen -= written;
 
 	if (rpc->r_aliases != NULL) {
 		if (*(rpc->r_aliases) != '\0') {
 			for (cp = rpc->r_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;
 
@@ -400,7 +400,7 @@ rpcent_test_getrpcent(struct rpcent *rpc
 	return (rpcent_test_correctness(rpc, NULL));
 }
 
-int
+static int
 run_tests(const char *snapshot_file, enum test_methods method)
 {
 	struct rpcent_test_data td, td_snap, td_2pass;



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