summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/devinfo/Makefile2
-rw-r--r--usr.sbin/devinfo/devinfo.c15
2 files changed, 13 insertions, 4 deletions
diff --git a/usr.sbin/devinfo/Makefile b/usr.sbin/devinfo/Makefile
index 3189188..f260e3b 100644
--- a/usr.sbin/devinfo/Makefile
+++ b/usr.sbin/devinfo/Makefile
@@ -6,4 +6,6 @@ NOMAN= #true
DPADD= ${LIBDEVINFO}
LDADD= -ldevinfo
+WARNS?= 2
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c
index 6f9bc5b..c74de6c 100644
--- a/usr.sbin/devinfo/devinfo.c
+++ b/usr.sbin/devinfo/devinfo.c
@@ -39,6 +39,13 @@
int rflag;
+static void print_resource(struct devinfo_res *);
+static int print_device_matching_resource(struct devinfo_res *, void *);
+static int print_device_rman_resources(struct devinfo_rman *, void *);
+static int print_device(struct devinfo_dev *, void *);
+static int print_rman_resource(struct devinfo_res *, void *);
+static int print_rman(struct devinfo_rman *, void *);
+
struct indent_arg
{
int indent;
@@ -130,7 +137,7 @@ print_device(struct devinfo_dev *dev, void *arg)
int i, indent;
if (dev->dd_name[0] != 0) {
- indent = (int)arg;
+ indent = (int)(intptr_t)arg;
for (i = 0; i < indent; i++)
printf(" ");
printf("%s\n", dev->dd_name);
@@ -143,14 +150,14 @@ print_device(struct devinfo_dev *dev, void *arg)
}
return(devinfo_foreach_device_child(dev, print_device,
- (void *)(indent + 2)));
+ (void *)((char *)arg + 2)));
}
/*
* Print information about a resource under a resource manager.
*/
int
-print_rman_resource(struct devinfo_res *res, void *arg)
+print_rman_resource(struct devinfo_res *res, void *arg __unused)
{
struct devinfo_dev *dev;
@@ -170,7 +177,7 @@ print_rman_resource(struct devinfo_res *res, void *arg)
* Print information about a resource manager.
*/
int
-print_rman(struct devinfo_rman *rman, void *arg)
+print_rman(struct devinfo_rman *rman, void *arg __unused)
{
printf("%s:\n", rman->dm_desc);
devinfo_foreach_rman_resource(rman, print_rman_resource, 0);
OpenPOWER on IntegriCloud