diff options
| author | Mike Heffner <mikeh@FreeBSD.org> | 2001-12-09 07:32:55 +0000 |
|---|---|---|
| committer | Mike Heffner <mikeh@FreeBSD.org> | 2001-12-09 07:32:55 +0000 |
| commit | 84e0df3fcf094f3664ecff7a5e1e8165a5787a09 (patch) | |
| tree | 2e514adb0c92be378832d95e4951af0648032536 /usr.sbin/devinfo | |
| parent | 87e5cd7c1ab9ab0a75e0e24689f135cdfbdae104 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/devinfo')
| -rw-r--r-- | usr.sbin/devinfo/Makefile | 2 | ||||
| -rw-r--r-- | usr.sbin/devinfo/devinfo.c | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/usr.sbin/devinfo/Makefile b/usr.sbin/devinfo/Makefile index 31891886b51c..f260e3b98460 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 6f9bc5b15adf..c74de6cdef12 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); |
