Skip to content

Commit f004fec

Browse files
committed
bluetooth: Add cast to forward declared struct
Logging v2 is using _Generic keyword for detecting type of log message arguments. Apparently, it does not support handling of pointers to forward declared structures. Added casting to void *. Signed-off-by: Krzysztof Chruscinski <[email protected]>
1 parent 9db6abb commit f004fec

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

subsys/bluetooth/mesh/pb_gatt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int bt_mesh_pb_gatt_recv(struct bt_conn *conn, struct net_buf_simple *buf)
7979

8080
int bt_mesh_pb_gatt_open(struct bt_conn *conn)
8181
{
82-
BT_DBG("conn %p", conn);
82+
BT_DBG("conn %p", (void *)conn);
8383

8484
if (link.conn) {
8585
return -EBUSY;
@@ -95,7 +95,7 @@ int bt_mesh_pb_gatt_open(struct bt_conn *conn)
9595

9696
int bt_mesh_pb_gatt_close(struct bt_conn *conn)
9797
{
98-
BT_DBG("conn %p", conn);
98+
BT_DBG("conn %p", (void *)conn);
9999

100100
if (link.conn != conn) {
101101
BT_DBG("Not connected");

subsys/bluetooth/mesh/proxy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static void proxy_connected(struct bt_conn *conn, uint8_t err)
548548
struct bt_mesh_proxy_client *client;
549549
int i;
550550

551-
BT_DBG("conn %p err 0x%02x", conn, err);
551+
BT_DBG("conn %p err 0x%02x", (void *)conn, err);
552552

553553
conn_count++;
554554

@@ -579,7 +579,7 @@ static void proxy_disconnected(struct bt_conn *conn, uint8_t reason)
579579
{
580580
int i;
581581

582-
BT_DBG("conn %p reason 0x%02x", conn, reason);
582+
BT_DBG("conn %p reason 0x%02x", (void *)conn, reason);
583583

584584
conn_count--;
585585

@@ -981,7 +981,7 @@ static int proxy_segment_and_send(struct bt_conn *conn, uint8_t type,
981981
{
982982
uint16_t mtu;
983983

984-
BT_DBG("conn %p type 0x%02x len %u: %s", conn, type, msg->len,
984+
BT_DBG("conn %p type 0x%02x len %u: %s", (void *)conn, type, msg->len,
985985
bt_hex(msg->data, msg->len));
986986

987987
/* ATT_MTU - OpCode (1 byte) - Handle (2 bytes) */

subsys/bluetooth/services/ots/ots_l2cap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static int l2cap_accept(struct bt_conn *conn, struct bt_l2cap_chan **chan)
125125
{
126126
struct bt_gatt_ots_l2cap *l2cap_ctx;
127127

128-
LOG_DBG("Incoming conn %p", conn);
128+
LOG_DBG("Incoming conn %p", (void *)conn);
129129

130130
SYS_SLIST_FOR_EACH_CONTAINER(&channels, l2cap_ctx, node) {
131131
if (l2cap_ctx->ot_chan.chan.conn) {

0 commit comments

Comments
 (0)