diff options
author | ru <ru@FreeBSD.org> | 2004-01-26 10:27:18 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-01-26 10:27:18 +0000 |
commit | 0455fe1058b9ad95f74f2f7e78bdc84e8463f79a (patch) | |
tree | 19c1d148874db0b1a5c18f726c2a1fc177e69dc5 | |
parent | b2153115982e1f5278468840fc4b6baec415a64a (diff) | |
download | FreeBSD-src-0455fe1058b9ad95f74f2f7e78bdc84e8463f79a.zip FreeBSD-src-0455fe1058b9ad95f74f2f7e78bdc84e8463f79a.tar.gz |
Make this WARNS=3 clean.
-rw-r--r-- | usr.sbin/ngctl/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/ngctl/config.c | 3 | ||||
-rw-r--r-- | usr.sbin/ngctl/connect.c | 2 | ||||
-rw-r--r-- | usr.sbin/ngctl/debug.c | 3 | ||||
-rw-r--r-- | usr.sbin/ngctl/dot.c | 5 | ||||
-rw-r--r-- | usr.sbin/ngctl/list.c | 7 | ||||
-rw-r--r-- | usr.sbin/ngctl/main.c | 2 | ||||
-rw-r--r-- | usr.sbin/ngctl/mkpeer.c | 5 | ||||
-rw-r--r-- | usr.sbin/ngctl/name.c | 3 | ||||
-rw-r--r-- | usr.sbin/ngctl/rmhook.c | 2 | ||||
-rw-r--r-- | usr.sbin/ngctl/show.c | 2 | ||||
-rw-r--r-- | usr.sbin/ngctl/status.c | 3 | ||||
-rw-r--r-- | usr.sbin/ngctl/types.c | 8 |
13 files changed, 28 insertions, 19 deletions
diff --git a/usr.sbin/ngctl/Makefile b/usr.sbin/ngctl/Makefile index 2674253..364bbf7 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 144293a..9b4c2b7 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 470468a..460e6b2 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 7b355e5..fbfce4e 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 bd6d39c..42969be 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 93e1024..ee4a84b 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 34373e8..7fac106 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 c5735e1..621d318 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 85c6eff..3de1360 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 4af398e..834cc0c 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 da51361..a413a94 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 75706b3..8c10a85 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 472933e..b22e9a4 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) { |