diff --git a/c2usb/port/zephyr/bluetooth/gatt.hpp b/c2usb/port/zephyr/bluetooth/gatt.hpp index db829c0..87ed1c2 100644 --- a/c2usb/port/zephyr/bluetooth/gatt.hpp +++ b/c2usb/port/zephyr/bluetooth/gatt.hpp @@ -171,7 +171,8 @@ class attribute : public ::bt_gatt_attr template T user_value() const { - return std::bit_cast(reinterpret_cast>(user_data)); + return std::bit_cast( + static_cast>(reinterpret_cast(user_data))); } template @@ -212,7 +213,7 @@ class attribute : public ::bt_gatt_attr { ::bt_gatt_notify_params params{.attr = this, .data = reinterpret_cast(data.data()), - .len = data.size(), + .len = static_cast(data.size()), .func = cb, .user_data = reinterpret_cast(user_data)}; return bt_gatt_notify_cb(conn, ¶ms);