summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
committerhselasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
commit126953ccbe190fe51094d1ccefda3226d1e5140c (patch)
tree70a9d586e75b3d8e087069f07020564df44b0b99 /sys/netgraph
parent56216c3bc99342baf89a814301e85dffe7a62a9b (diff)
downloadFreeBSD-src-126953ccbe190fe51094d1ccefda3226d1e5140c.zip
FreeBSD-src-126953ccbe190fe51094d1ccefda3226d1e5140c.tar.gz
Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9. MFC after: 1 weeks
Diffstat (limited to 'sys/netgraph')
-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 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);
OpenPOWER on IntegriCloud