mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-06 09:09:59 +00:00
controller: fix '-Wsometimes-uninitialized' issue
In ble_ll_pdu_max_tx_octets_get(), LLVM complains about the possibility of the `octets` variable not being intialized. This is the case, if no assert() function is compiled in. This commit fixes this by initializing `octets` to a save value.
This commit is contained in:
committed by
Andrzej Kaczmarek
parent
3098b06d0d
commit
fb5f503bd8
@@ -1426,7 +1426,7 @@ uint16_t
|
||||
ble_ll_pdu_max_tx_octets_get(uint32_t usecs, int phy_mode)
|
||||
{
|
||||
uint32_t header_tx_time;
|
||||
uint16_t octets;
|
||||
uint16_t octets = 0;
|
||||
|
||||
BLE_LL_ASSERT(phy_mode < BLE_PHY_NUM_MODE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user