Skip to content

Commit a55d62f

Browse files
cuiziweizwxiaoxiang781216
authored andcommitted
gnu++20:fix build warning to [-Wmaybe-uninitialized].
17:10:41 wireless/bluetooth/bt_slip.c:300:7: error: 'byte' may be used uninitialized [-Werror=maybe-uninitialized] 17:10:41 300 | wlerr("err: invalid escape byte %x\n", *byte); 17:10:41 | ^ 17:10:41 wireless/bluetooth/bt_slip.c: In function 'bt_slip_receive': 17:10:41 wireless/bluetooth/bt_slip.c:766:11: note: 'byte' was declared here 17:10:41 766 | uint8_t byte; 17:10:41 | ^~~~ Signed-off-by: cuiziwei <[email protected]>
1 parent 65fdc55 commit a55d62f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/wireless/bluetooth/bt_slip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ static int bt_slip_receive(FAR struct bt_driver_s *drv,
777777
FAR uint8_t *packet;
778778
FAR uint8_t *cursor;
779779
FAR uint8_t *header;
780-
uint8_t byte;
780+
uint8_t byte = 0;
781781
uint16_t checksum;
782782
size_t remaining;
783783
uint8_t state;

0 commit comments

Comments
 (0)