ANSIfy prototypes in subr_usbd.c.
Clang generates the following warnings when building subr_usbd.c: | subr_usbd.c:598:13: warning: promoted type 'int' of K&R function | parameter is not compatible with the parameter type 'uint8_t' (aka | 'unsigned char') declared in a previous prototype | subr_usbd.c:627:13: warning: promoted type 'int' of K&R function | parameter is not compatible with the parameter type 'uint8_t' (aka | 'unsigned char') declared in a previous prototype | subr_usbd.c:649:13: warning: promoted type 'int' of K&R function | parameter is not compatible with the parameter type 'uint8_t' (aka | 'unsigned char') declared in a previous prototype Instead of just ANSIfying these three prototypes, do it for the entire file. Spotted by: clang
This commit is contained in:
parent
bc5752e811
commit
6c9cdb5860
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209102
@ -234,9 +234,7 @@ usbd_libfini(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_iodispatch(dobj, ip)
|
usbd_iodispatch(device_object *dobj, irp *ip)
|
||||||
device_object *dobj;
|
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = dobj->do_devext;
|
device_t dev = dobj->do_devext;
|
||||||
int32_t status;
|
int32_t status;
|
||||||
@ -266,9 +264,7 @@ usbd_iodispatch(dobj, ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_ioinvalid(dobj, ip)
|
usbd_ioinvalid(device_object *dobj, irp *ip)
|
||||||
device_object *dobj;
|
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = dobj->do_devext;
|
device_t dev = dobj->do_devext;
|
||||||
struct io_stack_location *irp_sl;
|
struct io_stack_location *irp_sl;
|
||||||
@ -286,9 +282,7 @@ usbd_ioinvalid(dobj, ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_pnp(dobj, ip)
|
usbd_pnp(device_object *dobj, irp *ip)
|
||||||
device_object *dobj;
|
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = dobj->do_devext;
|
device_t dev = dobj->do_devext;
|
||||||
struct io_stack_location *irp_sl;
|
struct io_stack_location *irp_sl;
|
||||||
@ -306,9 +300,7 @@ usbd_pnp(dobj, ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_power(dobj, ip)
|
usbd_power(device_object *dobj, irp *ip)
|
||||||
device_object *dobj;
|
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = dobj->do_devext;
|
device_t dev = dobj->do_devext;
|
||||||
struct io_stack_location *irp_sl;
|
struct io_stack_location *irp_sl;
|
||||||
@ -327,8 +319,7 @@ usbd_power(dobj, ip)
|
|||||||
|
|
||||||
/* Convert USBD_STATUS to NTSTATUS */
|
/* Convert USBD_STATUS to NTSTATUS */
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_urb2nt(status)
|
usbd_urb2nt(int32_t status)
|
||||||
int32_t status;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
@ -387,8 +378,7 @@ usbd_usb2urb(int status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static union usbd_urb *
|
static union usbd_urb *
|
||||||
usbd_geturb(ip)
|
usbd_geturb(irp *ip)
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
struct io_stack_location *irp_sl;
|
struct io_stack_location *irp_sl;
|
||||||
|
|
||||||
@ -398,8 +388,7 @@ usbd_geturb(ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_submit_urb(ip)
|
usbd_submit_urb(irp *ip)
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
int32_t status;
|
int32_t status;
|
||||||
@ -452,8 +441,7 @@ usbd_submit_urb(ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_func_getdesc(ip)
|
usbd_func_getdesc(irp *ip)
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
#define NDISUSB_GETDESC_MAXRETRIES 3
|
#define NDISUSB_GETDESC_MAXRETRIES 3
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
@ -513,8 +501,7 @@ usbd_func_getdesc(ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_func_selconf(ip)
|
usbd_func_selconf(irp *ip)
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -593,11 +580,8 @@ usbd_func_selconf(ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static usb_error_t
|
static usb_error_t
|
||||||
usbd_setup_endpoint_one(ip, ifidx, ne, epconf)
|
usbd_setup_endpoint_one(irp *ip, uint8_t ifidx, struct ndisusb_ep *ne,
|
||||||
irp *ip;
|
struct usb_config *epconf)
|
||||||
uint8_t ifidx;
|
|
||||||
struct ndisusb_ep *ne;
|
|
||||||
struct usb_config *epconf;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
struct ndis_softc *sc = device_get_softc(dev);
|
struct ndis_softc *sc = device_get_softc(dev);
|
||||||
@ -622,9 +606,7 @@ usbd_setup_endpoint_one(ip, ifidx, ne, epconf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static usb_error_t
|
static usb_error_t
|
||||||
usbd_setup_endpoint_default(ip, ifidx)
|
usbd_setup_endpoint_default(irp *ip, uint8_t ifidx)
|
||||||
irp *ip;
|
|
||||||
uint8_t ifidx;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
struct ndis_softc *sc = device_get_softc(dev);
|
struct ndis_softc *sc = device_get_softc(dev);
|
||||||
@ -644,10 +626,8 @@ usbd_setup_endpoint_default(ip, ifidx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static usb_error_t
|
static usb_error_t
|
||||||
usbd_setup_endpoint(ip, ifidx, ep)
|
usbd_setup_endpoint(irp *ip, uint8_t ifidx,
|
||||||
irp *ip;
|
struct usb_endpoint_descriptor *ep)
|
||||||
uint8_t ifidx;
|
|
||||||
struct usb_endpoint_descriptor *ep;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
struct ndis_softc *sc = device_get_softc(dev);
|
struct ndis_softc *sc = device_get_softc(dev);
|
||||||
@ -702,8 +682,7 @@ usbd_setup_endpoint(ip, ifidx, ep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_func_abort_pipe(ip)
|
usbd_func_abort_pipe(irp *ip)
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
struct ndis_softc *sc = device_get_softc(dev);
|
struct ndis_softc *sc = device_get_softc(dev);
|
||||||
@ -726,8 +705,7 @@ usbd_func_abort_pipe(ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_func_vendorclass(ip)
|
usbd_func_vendorclass(irp *ip)
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
int32_t error;
|
int32_t error;
|
||||||
@ -781,9 +759,7 @@ usbd_func_vendorclass(ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usbd_irpcancel(dobj, ip)
|
usbd_irpcancel(device_object *dobj, irp *ip)
|
||||||
device_object *dobj;
|
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
struct ndis_softc *sc = device_get_softc(dev);
|
struct ndis_softc *sc = device_get_softc(dev);
|
||||||
@ -1102,9 +1078,7 @@ usbd_ctrl_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct ndisusb_ep *
|
static struct ndisusb_ep *
|
||||||
usbd_get_ndisep(ip, ep)
|
usbd_get_ndisep(irp *ip, usb_endpoint_descriptor_t *ep)
|
||||||
irp *ip;
|
|
||||||
usb_endpoint_descriptor_t *ep;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
struct ndis_softc *sc = device_get_softc(dev);
|
struct ndis_softc *sc = device_get_softc(dev);
|
||||||
@ -1119,9 +1093,7 @@ usbd_get_ndisep(ip, ep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usbd_xfertask(dobj, arg)
|
usbd_xfertask(device_object *dobj, void *arg)
|
||||||
device_object *dobj;
|
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
irp *ip;
|
irp *ip;
|
||||||
@ -1201,9 +1173,7 @@ usbd_xfertask(dobj, arg)
|
|||||||
* we don't want to be in the scope of HAL lock.
|
* we don't want to be in the scope of HAL lock.
|
||||||
*/
|
*/
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_taskadd(ip, type)
|
usbd_taskadd(irp *ip, unsigned type)
|
||||||
irp *ip;
|
|
||||||
unsigned type;
|
|
||||||
{
|
{
|
||||||
device_t dev = IRP_NDIS_DEV(ip);
|
device_t dev = IRP_NDIS_DEV(ip);
|
||||||
struct ndis_softc *sc = device_get_softc(dev);
|
struct ndis_softc *sc = device_get_softc(dev);
|
||||||
@ -1226,9 +1196,7 @@ usbd_taskadd(ip, type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usbd_task(dobj, arg)
|
usbd_task(device_object *dobj, void *arg)
|
||||||
device_object *dobj;
|
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
irp *ip;
|
irp *ip;
|
||||||
list_entry *l;
|
list_entry *l;
|
||||||
@ -1289,8 +1257,7 @@ usbd_task(dobj, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
usbd_func_bulkintr(ip)
|
usbd_func_bulkintr(irp *ip)
|
||||||
irp *ip;
|
|
||||||
{
|
{
|
||||||
int32_t error;
|
int32_t error;
|
||||||
struct ndisusb_ep *ne;
|
struct ndisusb_ep *ne;
|
||||||
@ -1336,9 +1303,7 @@ usbd_func_bulkintr(ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static union usbd_urb *
|
static union usbd_urb *
|
||||||
USBD_CreateConfigurationRequest(conf, len)
|
USBD_CreateConfigurationRequest(usb_config_descriptor_t *conf, uint16_t *len)
|
||||||
usb_config_descriptor_t *conf;
|
|
||||||
uint16_t *len;
|
|
||||||
{
|
{
|
||||||
struct usbd_interface_list_entry list[2];
|
struct usbd_interface_list_entry list[2];
|
||||||
union usbd_urb *urb;
|
union usbd_urb *urb;
|
||||||
@ -1355,9 +1320,8 @@ USBD_CreateConfigurationRequest(conf, len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static union usbd_urb *
|
static union usbd_urb *
|
||||||
USBD_CreateConfigurationRequestEx(conf, list)
|
USBD_CreateConfigurationRequestEx(usb_config_descriptor_t *conf,
|
||||||
usb_config_descriptor_t *conf;
|
struct usbd_interface_list_entry *list)
|
||||||
struct usbd_interface_list_entry *list;
|
|
||||||
{
|
{
|
||||||
int i, j, size;
|
int i, j, size;
|
||||||
struct usbd_interface_information *intf;
|
struct usbd_interface_information *intf;
|
||||||
@ -1413,8 +1377,7 @@ USBD_CreateConfigurationRequestEx(conf, list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
USBD_GetUSBDIVersion(ui)
|
USBD_GetUSBDIVersion(usbd_version_info *ui)
|
||||||
usbd_version_info *ui;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Pretend to be Windows XP. */
|
/* Pretend to be Windows XP. */
|
||||||
@ -1433,15 +1396,9 @@ USBD_ParseConfigurationDescriptor(usb_config_descriptor_t *conf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static usb_interface_descriptor_t *
|
static usb_interface_descriptor_t *
|
||||||
USBD_ParseConfigurationDescriptorEx(conf, start, intfnum,
|
USBD_ParseConfigurationDescriptorEx(usb_config_descriptor_t *conf,
|
||||||
altset, intfclass, intfsubclass, intfproto)
|
void *start, int32_t intfnum, int32_t altset, int32_t intfclass,
|
||||||
usb_config_descriptor_t *conf;
|
int32_t intfsubclass, int32_t intfproto)
|
||||||
void *start;
|
|
||||||
int32_t intfnum;
|
|
||||||
int32_t altset;
|
|
||||||
int32_t intfclass;
|
|
||||||
int32_t intfsubclass;
|
|
||||||
int32_t intfproto;
|
|
||||||
{
|
{
|
||||||
struct usb_descriptor *next = NULL;
|
struct usb_descriptor *next = NULL;
|
||||||
usb_interface_descriptor_t *desc;
|
usb_interface_descriptor_t *desc;
|
||||||
|
Loading…
Reference in New Issue
Block a user