From e455855db8f578ffbbb3b7d12ee900fc04cc0cf9 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 18 Oct 2012 14:30:27 +0200 Subject: [PATCH] yppoll(8): Comment out -h option. The implementation of it is missing (see e.g. NetBSD or OpenBSD). Until someone works on it, comment out the existing code to silence a warning about 'hostname' being set but unused. Found-by: gcc47 --- usr.sbin/yppoll/yppoll.8 | 23 +++++++++++------------ usr.sbin/yppoll/yppoll.c | 11 ++++++++++- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/usr.sbin/yppoll/yppoll.8 b/usr.sbin/yppoll/yppoll.8 index cff67a4ddc..8512c1c32c 100644 --- a/usr.sbin/yppoll/yppoll.8 +++ b/usr.sbin/yppoll/yppoll.8 @@ -33,9 +33,8 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD: src/usr.sbin/yppoll/yppoll.8,v 1.4.2.3 2003/03/11 22:31:35 trhodes Exp $ -.\" $DragonFly: src/usr.sbin/yppoll/yppoll.8,v 1.3 2006/11/11 18:50:04 swildner Exp $ .\" -.Dd October 25, 1994 +.Dd October 18, 2012 .Dt YPPOLL 8 .Os .Sh NAME @@ -43,7 +42,7 @@ .Nd ask version of YP map from YP server .Sh SYNOPSIS .Nm -.Op Fl h Ar host +.\".Op Fl h Ar host .Op Fl d Ar domain .Ar mapname .Sh DESCRIPTION @@ -56,15 +55,15 @@ server for .Pp The options are as follows: .Bl -tag -width indent -.It Fl h Ar host -Ask the YP server process running on -.Ar host -for information about -.Ar mapname . -If -.Ar host -is not specified, the server polled is the default server returned by -.Xr ypwhich 1 . +.\".It Fl h Ar host +.\"Ask the YP server process running on +.\".Ar host +.\"for information about +.\".Ar mapname . +.\"If +.\".Ar host +.\"is not specified, the server polled is the default server returned by +.\".Xr ypwhich 1 . .It Fl d Ar domain Use the YP domain .Ar domain diff --git a/usr.sbin/yppoll/yppoll.c b/usr.sbin/yppoll/yppoll.c index 4619a96a5f..da65a9727c 100644 --- a/usr.sbin/yppoll/yppoll.c +++ b/usr.sbin/yppoll/yppoll.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/yppoll/yppoll.c,v 1.5.2.2 2002/02/15 00:46:59 des Exp $ - * $DragonFly: src/usr.sbin/yppoll/yppoll.c,v 1.3 2005/11/24 22:23:02 swildner Exp $ */ #include @@ -48,7 +47,11 @@ static void usage(void) { +#if 0 fprintf(stderr, "usage: yppoll [-h host] [-d domainname] mapname\n"); +#else + fprintf(stderr, "usage: yppoll [-d domainname] mapname\n"); +#endif exit(1); } @@ -56,7 +59,9 @@ int main(int argc, char **argv) { char *domainname; +#if 0 char *hostname = "localhost"; +#endif char *inmap, *master; int order; int c, r; @@ -69,7 +74,11 @@ main(int argc, char **argv) domainname = optarg; break; case 'h': +#if 0 hostname = optarg; +#else + /* does nothing */ +#endif break; case '?': usage(); -- 2.41.0