aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/bluetooth/drivers
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
commit6d917491f5e4d12a9c833584e66600486ec55a09 (patch)
tree70a9d586e75b3d8e087069f07020564df44b0b99 /sys/netgraph/bluetooth/drivers
parent120a742b8682f4974f143fa9b020f53ba92864a5 (diff)
downloadsrc-6d917491f5e4d12a9c833584e66600486ec55a09.tar.gz
src-6d917491f5e4d12a9c833584e66600486ec55a09.zip
Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9. MFC after: 1 weeks
Notes
Notes: svn path=/head/; revision=233774
Diffstat (limited to 'sys/netgraph/bluetooth/drivers')
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index d3f8fd3c6798..a7fa2afb4719 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);