Skip to content

Commit

Permalink
bluetooth: conn: Fix compiler warning
Browse files Browse the repository at this point in the history
When compiling conn.c using arm-none-eabi-gcc version 11.3.1 2022071
with the -Wmaybe-uninitialized flag a warning is emitted due to
pending_no_cb not being initialized. I'm not sure if initializing it to
NULL is the "correct" fix, but it's certainly not any worse then it being
uninitialized, and it fixes the warning.

Signed-off-by: Dennis Grijalva <[email protected]>
  • Loading branch information
dennisgr102 authored and jhedberg committed Oct 8, 2023
1 parent a6adaed commit b122685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static inline uint16_t conn_mtu(struct bt_conn *conn)
static int do_send_frag(struct bt_conn *conn, struct net_buf *buf, uint8_t flags)
{
struct bt_conn_tx *tx = tx_data(buf)->tx;
uint32_t *pending_no_cb;
uint32_t *pending_no_cb = NULL;
unsigned int key;
int err = 0;

Expand Down

0 comments on commit b122685

Please sign in to comment.