Skip to content
Commit e3da5c3d authored by Alberto Escolar Piedras's avatar Alberto Escolar Piedras Committed by Anas Nashif
Browse files

Bluetooth: Mesh: Fix build warning with gcc 13



gcc 13 thinks  max_adv_duration may be used unitialized
and warns accordingly (see below)
It seems the reason is the goto, which confuses it.
In any case, pacifying this warning is trivial,
so let's just do so.

The warning:
```
In function ‘gatt_proxy_advertise’,
inlined from ‘bt_mesh_proxy_adv_start’ at
subsys/bluetooth/mesh/proxy_srv.c:1214:9:
subsys/bluetooth/mesh/proxy_srv.c:842:44: error: ‘max_adv_duration’ may
be used uninitialized [-Werror=maybe-uninitialized]
subsys/bluetooth/mesh/proxy_srv.c: In function ‘bt_mesh_proxy_adv_start’
zephyr/subsys/bluetooth/mesh/proxy_srv.c:786:17: note:
‘max_adv_duration’ was declared here
  786 |         int32_t max_adv_duration;
      |                 ^~~~~~~~~~~~~~~~
```

Signed-off-by: default avatarAlberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
parent 7331b071
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment