diff options
| author | dsl <dsl@NetBSD.org> | 2012-06-02 21:36:41 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2012-06-02 21:36:41 +0000 |
| commit | 7c283e7753365d4f53a7263a22beeeb5de8d7c5b (patch) | |
| tree | b8a9f9ee0b7068a5d755d6b6d2eeb4486987cd94 /sys/dev/usb | |
| parent | 284643b9f337a125e69cb0b05e69ce4fa4f75a74 (diff) | |
Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
the item itself.
In the places where the caller specifies a function and a structure
address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/ubt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c index dd659e59f04..18bf8f9bddb 100644 --- a/sys/dev/usb/ubt.c +++ b/sys/dev/usb/ubt.c @@ -1,4 +1,4 @@ -/* $NetBSD: ubt.c,v 1.47 2012/04/24 20:04:49 christos Exp $ */ +/* $NetBSD: ubt.c,v 1.48 2012/06/02 21:36:45 dsl Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.47 2012/04/24 20:04:49 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.48 2012/06/02 21:36:45 dsl Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -500,7 +500,7 @@ ubt_attach(device_t parent, device_t self, void *aux) CTLTYPE_INT, "config", SYSCTL_DESCR("configuration number"), ubt_sysctl_config, 0, - sc, 0, + (void *)sc, 0, CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL); |
