aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2004-01-26 10:27:18 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2004-01-26 10:27:18 +0000
commit723c1c2ee877347697efcbdb5667908b47e60514 (patch)
tree19c1d148874db0b1a5c18f726c2a1fc177e69dc5 /usr.sbin
parent68b7b3a961632847e8a57189e40437ec2127189b (diff)
downloadsrc-723c1c2ee877347697efcbdb5667908b47e60514.tar.gz
src-723c1c2ee877347697efcbdb5667908b47e60514.zip
Make this WARNS=3 clean.
Notes
Notes: svn path=/head/; revision=125011
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ngctl/Makefile2
-rw-r--r--usr.sbin/ngctl/config.c3
-rw-r--r--usr.sbin/ngctl/connect.c2
-rw-r--r--usr.sbin/ngctl/debug.c3
-rw-r--r--usr.sbin/ngctl/dot.c5
-rw-r--r--usr.sbin/ngctl/list.c7
-rw-r--r--usr.sbin/ngctl/main.c2
-rw-r--r--usr.sbin/ngctl/mkpeer.c5
-rw-r--r--usr.sbin/ngctl/name.c3
-rw-r--r--usr.sbin/ngctl/rmhook.c2
-rw-r--r--usr.sbin/ngctl/show.c2
-rw-r--r--usr.sbin/ngctl/status.c3
-rw-r--r--usr.sbin/ngctl/types.c8
13 files changed, 28 insertions, 19 deletions
diff --git a/usr.sbin/ngctl/Makefile b/usr.sbin/ngctl/Makefile
index 2674253f6a3e..364bbf7b8a7d 100644
--- a/usr.sbin/ngctl/Makefile
+++ b/usr.sbin/ngctl/Makefile
@@ -5,7 +5,7 @@ PROG= ngctl
MAN= ngctl.8
SRCS= main.c mkpeer.c config.c connect.c dot.c name.c show.c list.c \
msg.c debug.c shutdown.c rmhook.c status.c types.c write.c
-
+WARNS?= 3
DPADD= ${LIBNETGRAPH}
LDADD= -lnetgraph
diff --git a/usr.sbin/ngctl/config.c b/usr.sbin/ngctl/config.c
index 144293abd560..9b4c2b7b9414 100644
--- a/usr.sbin/ngctl/config.c
+++ b/usr.sbin/ngctl/config.c
@@ -46,7 +46,8 @@ const struct ngcmd config_cmd = {
ConfigCmd,
"config <path> [arguments]",
"get or set configuration of node at <path>",
- NULL
+ NULL,
+ {}
};
static int
diff --git a/usr.sbin/ngctl/connect.c b/usr.sbin/ngctl/connect.c
index 470468a0dff2..460e6b26e334 100644
--- a/usr.sbin/ngctl/connect.c
+++ b/usr.sbin/ngctl/connect.c
@@ -57,7 +57,7 @@ static int
ConnectCmd(int ac, char **av)
{
struct ngm_connect con;
- char *path = ".";
+ const char *path = ".";
/* Get arguments */
switch (ac) {
diff --git a/usr.sbin/ngctl/debug.c b/usr.sbin/ngctl/debug.c
index 7b355e5d1fec..fbfce4ee628b 100644
--- a/usr.sbin/ngctl/debug.c
+++ b/usr.sbin/ngctl/debug.c
@@ -48,7 +48,8 @@ const struct ngcmd debug_cmd = {
"Without any argument, this command displays the current"
" debugging verbosity level. If the argument is ``+'' or ``-''"
" the debug level is incremented or decremented; otherwise,"
- " it must be an absolute numerical level."
+ " it must be an absolute numerical level.",
+ {}
};
static int
diff --git a/usr.sbin/ngctl/dot.c b/usr.sbin/ngctl/dot.c
index bd6d39c62cd9..42969be69f83 100644
--- a/usr.sbin/ngctl/dot.c
+++ b/usr.sbin/ngctl/dot.c
@@ -61,7 +61,8 @@ DotCmd(int ac, char **av)
struct ng_mesg *const nlresp = (struct ng_mesg *)nlrbuf;
struct namelist *const nlist = (struct namelist *)nlresp->data;
FILE *f = stdout;
- int ch, i;
+ int ch;
+ u_int i;
/* Get options */
optind = 1;
@@ -129,7 +130,7 @@ DotCmd(int ac, char **av)
struct hooklist *const hlist = (struct hooklist *)hlresp->data;
struct nodeinfo *const ninfo = &hlist->nodeinfo;
char path[NG_PATHSIZ];
- int j;
+ u_int j;
(void)snprintf(path, sizeof(path), "[%jx]:",
(uintmax_t)nlist->nodeinfo[i].id);
diff --git a/usr.sbin/ngctl/list.c b/usr.sbin/ngctl/list.c
index 93e1024dda09..ee4a84b37829 100644
--- a/usr.sbin/ngctl/list.c
+++ b/usr.sbin/ngctl/list.c
@@ -58,7 +58,8 @@ ListCmd(int ac, char **av)
struct ng_mesg *const resp = (struct ng_mesg *) rbuf;
struct namelist *const nlist = (struct namelist *) resp->data;
int named_only = 0;
- int k, ch, rtn = CMDRTN_OK;
+ int ch, rtn = CMDRTN_OK;
+ u_int k;
/* Get options */
optind = 1;
@@ -100,11 +101,11 @@ ListCmd(int ac, char **av)
nlist->numnames, named_only ? "named " : "");
for (k = 0; k < nlist->numnames; k++) {
char path[NG_PATHSIZ];
- char *av[3] = { "list", "-n", path };
+ char *argv[3] = { "list", "-n", path };
snprintf(path, sizeof(path),
"[%lx]:", (u_long) nlist->nodeinfo[k].id);
- if ((rtn = (*show_cmd.func)(3, av)) != CMDRTN_OK)
+ if ((rtn = (*show_cmd.func)(3, argv)) != CMDRTN_OK)
break;
}
diff --git a/usr.sbin/ngctl/main.c b/usr.sbin/ngctl/main.c
index 34373e845294..7fac106e57e4 100644
--- a/usr.sbin/ngctl/main.c
+++ b/usr.sbin/ngctl/main.c
@@ -453,7 +453,7 @@ HelpCmd(int ac, char **av)
* QuitCmd()
*/
static int
-QuitCmd(int ac, char **av)
+QuitCmd(int ac __unused, char **av __unused)
{
return(CMDRTN_QUIT);
}
diff --git a/usr.sbin/ngctl/mkpeer.c b/usr.sbin/ngctl/mkpeer.c
index c5735e13650a..621d318ecf40 100644
--- a/usr.sbin/ngctl/mkpeer.c
+++ b/usr.sbin/ngctl/mkpeer.c
@@ -49,14 +49,15 @@ const struct ngcmd mkpeer_cmd = {
" and connects it to the node at \"path\". The hooks used for the"
" connection are \"hook\" on the original node and \"peerhook\""
" on the new node."
- " If \"path\" is omitted then \".\" is assumed."
+ " If \"path\" is omitted then \".\" is assumed.",
+ {}
};
static int
MkPeerCmd(int ac, char **av)
{
struct ngm_mkpeer mkp;
- char *path = ".";
+ const char *path = ".";
/* Get arguments */
switch (ac) {
diff --git a/usr.sbin/ngctl/name.c b/usr.sbin/ngctl/name.c
index 85c6eff5d0f0..3de136034785 100644
--- a/usr.sbin/ngctl/name.c
+++ b/usr.sbin/ngctl/name.c
@@ -45,7 +45,8 @@ const struct ngcmd name_cmd = {
NameCmd,
"name <path> <name>",
"Assign name <name> to the node at <path>",
- NULL
+ NULL,
+ {}
};
static int
diff --git a/usr.sbin/ngctl/rmhook.c b/usr.sbin/ngctl/rmhook.c
index 4af398e34e5a..834cc0c909d9 100644
--- a/usr.sbin/ngctl/rmhook.c
+++ b/usr.sbin/ngctl/rmhook.c
@@ -55,7 +55,7 @@ static int
RmHookCmd(int ac, char **av)
{
struct ngm_rmhook rmh;
- char *path = ".";
+ const char *path = ".";
/* Get arguments */
switch (ac) {
diff --git a/usr.sbin/ngctl/show.c b/usr.sbin/ngctl/show.c
index da51361a6ee7..a413a943ff1b 100644
--- a/usr.sbin/ngctl/show.c
+++ b/usr.sbin/ngctl/show.c
@@ -105,7 +105,7 @@ ShowCmd(int ac, char **av)
printf(" Name: %-15s Type: %-15s ID: %08x Num hooks: %d\n",
ninfo->name, ninfo->type, ninfo->id, ninfo->hooks);
if (!no_hooks && ninfo->hooks > 0) {
- int k;
+ u_int k;
printf(FMT, "Local hook", "Peer name",
"Peer type", "Peer ID", "Peer hook");
diff --git a/usr.sbin/ngctl/status.c b/usr.sbin/ngctl/status.c
index 75706b3103bb..8c10a854afb8 100644
--- a/usr.sbin/ngctl/status.c
+++ b/usr.sbin/ngctl/status.c
@@ -47,7 +47,8 @@ const struct ngcmd status_cmd = {
StatusCmd,
"status <path>",
"Get human readable status information from the node at <path>",
- NULL
+ NULL,
+ {}
};
static int
diff --git a/usr.sbin/ngctl/types.c b/usr.sbin/ngctl/types.c
index 472933eb35de..b22e9a4a679a 100644
--- a/usr.sbin/ngctl/types.c
+++ b/usr.sbin/ngctl/types.c
@@ -45,16 +45,18 @@ const struct ngcmd types_cmd = {
TypesCmd,
"types",
"Show information about all installed node types",
- NULL
+ NULL,
+ {}
};
static int
-TypesCmd(int ac, char **av)
+TypesCmd(int ac, char **av __unused)
{
u_char rbuf[16 * 1024];
struct ng_mesg *const resp = (struct ng_mesg *) rbuf;
struct typelist *const tlist = (struct typelist *) resp->data;
- int k, rtn = CMDRTN_OK;
+ int rtn = CMDRTN_OK;
+ u_int k;
/* Get arguments */
switch (ac) {