Skip to content

Commit

Permalink
bluetooth: host: fix formatter warnings
Browse files Browse the repository at this point in the history
Update the string formatter according to the type of the
variables that it is printing to eliminate compilation
warnings.

Signed-off-by: Yong Cong Sin <[email protected]>
Signed-off-by: Yong Cong Sin <[email protected]>
  • Loading branch information
ycsin authored and carlescufi committed Sep 23, 2024
1 parent e231039 commit d250664
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ static int hci_set_ad_ext(struct bt_le_ext_adv *adv, uint16_t hci_op,
}

if (total_len_bytes > bt_dev.le.max_adv_data_len) {
LOG_WRN("adv or scan rsp data too large (%d > max %d)", total_len_bytes,
LOG_WRN("adv or scan rsp data too large (%zu > max %u)", total_len_bytes,
bt_dev.le.max_adv_data_len);
return -EDOM;
}
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct net_buf *bt_buf_make_view(struct net_buf *view,

__ASSERT_NO_MSG(!bt_buf_has_view(parent));

LOG_DBG("make-view %p viewsize %u meta %p", view, len, meta);
LOG_DBG("make-view %p viewsize %zu meta %p", view, len, meta);

net_buf_simple_clone(&parent->b, &view->b);
view->size = net_buf_headroom(parent) + len;
Expand Down
4 changes: 2 additions & 2 deletions subsys/bluetooth/host/conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static struct net_buf *get_data_frag(struct net_buf *outside, size_t winsize)
window = bt_buf_make_view(window, outside,
winsize, &get_frag_md(window)->view_meta);

LOG_DBG("get-acl-frag: outside %p window %p size %d", outside, window, winsize);
LOG_DBG("get-acl-frag: outside %p window %p size %zu", outside, window, winsize);

return window;
}
Expand Down Expand Up @@ -651,7 +651,7 @@ static int send_buf(struct bt_conn *conn, struct net_buf *buf,
return -EIO;
}

LOG_DBG("conn %p buf %p len %u buf->len %u cb %p ud %p",
LOG_DBG("conn %p buf %p len %zu buf->len %u cb %p ud %p",
conn, buf, len, buf->len, cb, ud);

/* Acquire the right to send 1 packet to the controller */
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ struct net_buf *l2cap_data_pull(struct bt_conn *conn,
struct bt_l2cap_hdr *hdr;
uint16_t pdu_len = get_pdu_len(lechan, pdu);

LOG_DBG("Adding L2CAP PDU header: buf %p chan %p len %zu / %zu",
LOG_DBG("Adding L2CAP PDU header: buf %p chan %p len %u / %u",
pdu, lechan, pdu_len, pdu->len);

LOG_HEXDUMP_DBG(pdu->data, pdu->len, "PDU payload");
Expand Down

0 comments on commit d250664

Please sign in to comment.