Skip to content

Commit 8decb01

Browse files
ycsinPavelVPV
authored andcommitted
[nrf fromtree] bluetooth: host: fix formatter warnings
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]> (cherry picked from commit d250664)
1 parent ce223cc commit 8decb01

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

subsys/bluetooth/host/adv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ static int hci_set_ad_ext(struct bt_le_ext_adv *adv, uint16_t hci_op,
662662
}
663663

664664
if (total_len_bytes > bt_dev.le.max_adv_data_len) {
665-
LOG_WRN("adv or scan rsp data too large (%d > max %d)", total_len_bytes,
665+
LOG_WRN("adv or scan rsp data too large (%zu > max %u)", total_len_bytes,
666666
bt_dev.le.max_adv_data_len);
667667
return -EDOM;
668668
}

subsys/bluetooth/host/buf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ struct net_buf *bt_buf_make_view(struct net_buf *view,
158158

159159
__ASSERT_NO_MSG(!bt_buf_has_view(parent));
160160

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

163163
net_buf_simple_clone(&parent->b, &view->b);
164164
view->size = net_buf_headroom(parent) + len;

subsys/bluetooth/host/conn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static struct net_buf *get_data_frag(struct net_buf *outside, size_t winsize)
155155
window = bt_buf_make_view(window, outside,
156156
winsize, &get_frag_md(window)->view_meta);
157157

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

160160
return window;
161161
}
@@ -651,7 +651,7 @@ static int send_buf(struct bt_conn *conn, struct net_buf *buf,
651651
return -EIO;
652652
}
653653

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

657657
/* Acquire the right to send 1 packet to the controller */

subsys/bluetooth/host/l2cap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ struct net_buf *l2cap_data_pull(struct bt_conn *conn,
937937
struct bt_l2cap_hdr *hdr;
938938
uint16_t pdu_len = get_pdu_len(lechan, pdu);
939939

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

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

0 commit comments

Comments
 (0)