aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-02-28 16:16:37 +0000
committerEd Schouten <ed@FreeBSD.org>2009-02-28 16:16:37 +0000
commitb57fd79960c1f05327d4ea570649a6ed33ca0b28 (patch)
tree96fe5e02aaa20a06e1b52248af896fc5f0e49a35 /usr.bin
parent8e31b96c07e6ea581538e84c245eddabd364327b (diff)
downloadsrc-b57fd79960c1f05327d4ea570649a6ed33ca0b28.tar.gz
src-b57fd79960c1f05327d4ea570649a6ed33ca0b28.zip
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: <bf2006a yahoo com> Tested by: bms
Notes
Notes: svn path=/head/; revision=189169
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/newkey/newkey.c6
-rw-r--r--usr.bin/newkey/update.c8
2 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/newkey/newkey.c b/usr.bin/newkey/newkey.c
index 22d34e7a5e59..be3b2bb3927a 100644
--- a/usr.bin/newkey/newkey.c
+++ b/usr.bin/newkey/newkey.c
@@ -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, char *secret)
* 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:
diff --git a/usr.bin/newkey/update.c b/usr.bin/newkey/update.c
index 533568fe836d..11a1db94261a 100644
--- a/usr.bin/newkey/update.c
+++ b/usr.bin/newkey/update.c
@@ -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;