From 126953ccbe190fe51094d1ccefda3226d1e5140c Mon Sep 17 00:00:00 2001 From: hselasky Date: Mon, 2 Apr 2012 10:50:42 +0000 Subject: Fix compiler warnings, mostly signed issues, when USB modules are compiled with WARNS=9. MFC after: 1 weeks --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/netgraph') diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index d3f8fd3..a7fa2af 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -726,7 +726,7 @@ ubt_intr_read_callback(struct usb_xfer *xfer, usb_error_t error) actlen); /* Validate packet and send it up the stack */ - if (m->m_pkthdr.len < sizeof(*hdr)) { + if (m->m_pkthdr.len < (int)sizeof(*hdr)) { UBT_INFO(sc, "HCI event packet is too short\n"); UBT_STAT_IERROR(sc); @@ -788,8 +788,8 @@ ubt_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct mbuf *m; ng_hci_acldata_pkt_t *hdr; struct usb_page_cache *pc; - uint16_t len; - int actlen; + int len; + int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); @@ -826,7 +826,7 @@ ubt_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) actlen); /* Validate packet and send it up the stack */ - if (m->m_pkthdr.len < sizeof(*hdr)) { + if (m->m_pkthdr.len < (int)sizeof(*hdr)) { UBT_INFO(sc, "HCI ACL packet is too short\n"); UBT_STAT_IERROR(sc); @@ -835,7 +835,7 @@ ubt_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) hdr = mtod(m, ng_hci_acldata_pkt_t *); len = le16toh(hdr->length); - if (len != (m->m_pkthdr.len - sizeof(*hdr))) { + if (len != (int)(m->m_pkthdr.len - sizeof(*hdr))) { UBT_ERR(sc, "Invalid ACL packet size, length=%d, " \ "pktlen=%d\n", len, m->m_pkthdr.len); @@ -1650,7 +1650,7 @@ ng_ubt_rcvdata(hook_p hook, item_p item) /* Process HCI frame */ switch (*mtod(m, uint8_t *)) { /* XXX call m_pullup ? */ case NG_HCI_CMD_PKT: - if (m->m_pkthdr.len - 1 > UBT_CTRL_BUFFER_SIZE) + if (m->m_pkthdr.len - 1 > (int)UBT_CTRL_BUFFER_SIZE) panic("HCI command frame size is too big! " \ "buffer size=%zd, packet len=%d\n", UBT_CTRL_BUFFER_SIZE, m->m_pkthdr.len); -- cgit v1.1