From d4ce73cfd5e3bb23defffd765cdb9baca1e1ee68 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 16 Oct 2011 10:00:28 +0000 Subject: Fix ncplist to build with WARNS=6. Add some const and static keywords to get it all to build. Also add missing #includes. --- usr.bin/ncplist/Makefile | 2 -- usr.bin/ncplist/ncplist.c | 12 +++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.bin/ncplist') diff --git a/usr.bin/ncplist/Makefile b/usr.bin/ncplist/Makefile index b5baed4..8e6d189 100644 --- a/usr.bin/ncplist/Makefile +++ b/usr.bin/ncplist/Makefile @@ -2,8 +2,6 @@ PROG= ncplist -WARNS?= 0 - DPADD= ${LIBNCP} ${LIBIPX} LDADD= -lncp -lipx diff --git a/usr.bin/ncplist/ncplist.c b/usr.bin/ncplist/ncplist.c index e2c2ce4..9478718 100644 --- a/usr.bin/ncplist/ncplist.c +++ b/usr.bin/ncplist/ncplist.c @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -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; -- cgit v1.1