bluetooth: Fix compiler warning with arm-clang

Since we enable -fshort-enums for arm-clang we get the following
warning:

subsys/bluetooth/mesh/pb_adv.c:139:40: warning: cast to smaller
integer type 'enum prov_bearer_link_status' from
 'void *' [-Wvoid-pointer-to-enum-cast]

Fix this by first casting to an int to grow the size of the type.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
This commit is contained in:
Kumar Gala 2023-04-06 12:16:43 -05:00 committed by Anas Nashif
commit 0686476310

View file

@ -136,7 +136,7 @@ static void close_link(enum prov_bearer_link_status status);
static void buf_sent(int err, void *user_data)
{
enum prov_bearer_link_status reason = (enum prov_bearer_link_status)user_data;
enum prov_bearer_link_status reason = (enum prov_bearer_link_status)(int)user_data;
if (atomic_test_and_clear_bit(link.flags, ADV_LINK_CLOSING)) {
close_link(reason);