From owner-svn-src-all@FreeBSD.ORG Sat Feb 28 16:16:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DE33106564A; Sat, 28 Feb 2009 16:16:38 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E56C58FC15; Sat, 28 Feb 2009 16:16:37 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SGGbIN014307; Sat, 28 Feb 2009 16:16:37 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SGGbWG014305; Sat, 28 Feb 2009 16:16:37 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200902281616.n1SGGbWG014305@svn.freebsd.org> From: Ed Schouten Date: Sat, 28 Feb 2009 16:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189169 - head/usr.bin/newkey X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 16:16:38 -0000 Author: ed Date: Sat Feb 28 16:16:37 2009 New Revision: 189169 URL: http://svn.freebsd.org/changeset/base/189169 Log: Fix compilation of newkey(8) with WITHOUT_NIS=yes. Increasing WARNS seems to have broken compilation of this utility. Instead of lowering WARNS, just fix to code to compile properly. Submitted by: Tested by: bms Modified: head/usr.bin/newkey/newkey.c head/usr.bin/newkey/update.c Modified: head/usr.bin/newkey/newkey.c ============================================================================== --- head/usr.bin/newkey/newkey.c Sat Feb 28 15:53:36 2009 (r189168) +++ head/usr.bin/newkey/newkey.c Sat Feb 28 16:16:37 2009 (r189169) @@ -87,7 +87,7 @@ static char YPDBPATH[]="/var/yp"; static char PKMAP[] = "publickey.byname"; #else static char PKFILE[] = "/etc/publickey"; -static char *err_string(); +static const char *err_string(int); #endif /* YP */ static void usage(void); @@ -199,10 +199,10 @@ setpublicmap(char *name, char *public, c * to an input error code. An input value of zero will return * a success message. */ -static char * +static const char * err_string(int code) { - char *pmesg; + const char *pmesg; switch (code) { case 0: Modified: head/usr.bin/newkey/update.c ============================================================================== --- head/usr.bin/newkey/update.c Sat Feb 28 15:53:36 2009 (r189168) +++ head/usr.bin/newkey/update.c Sat Feb 28 16:16:37 2009 (r189169) @@ -70,11 +70,7 @@ __FBSDID("$FreeBSD$"); static char SHELL[] = "/bin/sh"; static char YPDBPATH[]="/var/yp"; /* This is defined but not used! */ static char UPDATEFILE[] = "updaters"; -#else -static char PKFILE[] = "/etc/publickey"; -#endif /* YP */ -#ifdef YP static int _openchild(char *, FILE **, FILE **); static char *basename(char *path); @@ -238,8 +234,8 @@ static int match(char *, char *); * the local file and then shuts up. */ int -localupdate(char *name, char *filename, u_int op, u_int keylen, - char *key, u_int datalen, char *data) +localupdate(char *name, char *filename, u_int op, u_int keylen __unused, + char *key, u_int datalen __unused, char *data) { char line[256]; FILE *rf;