svn commit: r226429 - head/usr.bin/ncplist
Ed Schouten
ed at FreeBSD.org
Sun Oct 16 10:00:29 UTC 2011
Author: ed
Date: Sun Oct 16 10:00:28 2011
New Revision: 226429
URL: http://svn.freebsd.org/changeset/base/226429
Log:
Fix ncplist to build with WARNS=6.
Add some const and static keywords to get it all to build. Also add
missing #includes.
Modified:
head/usr.bin/ncplist/Makefile
head/usr.bin/ncplist/ncplist.c
Modified: head/usr.bin/ncplist/Makefile
==============================================================================
--- head/usr.bin/ncplist/Makefile Sun Oct 16 09:09:33 2011 (r226428)
+++ head/usr.bin/ncplist/Makefile Sun Oct 16 10:00:28 2011 (r226429)
@@ -2,8 +2,6 @@
PROG= ncplist
-WARNS?= 0
-
DPADD= ${LIBNCP} ${LIBIPX}
LDADD= -lncp -lipx
Modified: head/usr.bin/ncplist/ncplist.c
==============================================================================
--- head/usr.bin/ncplist/ncplist.c Sun Oct 16 09:09:33 2011 (r226428)
+++ head/usr.bin/ncplist/ncplist.c Sun Oct 16 10:00:28 2011 (r226429)
@@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/time.h>
+#include <grp.h>
+#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -153,7 +155,7 @@ show_serverlist(char *server)
{
int found = 0, connid;
struct ncp_bindery_object obj;
- char *pattern = "*";
+ const char *pattern = "*";
connid = ncp_get_connid(server, 1);
if (connid < 0)
@@ -229,7 +231,7 @@ show_userlist(char *server)
return;
}
-void
+static void
show_queuelist(char *server, char *patt)
{
struct ncp_bindery_object q;
@@ -298,8 +300,8 @@ list_volumes(char *server)
}
struct ncp_bind_type {
- u_long type;
- char *name;
+ u_long type;
+ const char *name;
};
static struct ncp_bind_type btypes[] = {
@@ -310,7 +312,7 @@ static struct ncp_bind_type btypes[] = {
{0, NULL}
};
-void
+static void
list_bindery(char *server, char *type, char *patt)
{
struct ncp_bindery_object q;
More information about the svn-src-all
mailing list