* [PATCH BlueZ v1 0/5] Add Bluetooth Ranging Service (RAS) support
@ 2026-01-27 6:47 Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Prathibha Madugonde @ 2026-01-27 6:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
The series must be applied as a whole, as later patches depend on
infrastructure introduced by earlier ones. It includes UUID definitions,
monitor support, the GATT server/client implementation, and unit tests.
The Ranging Profile is marked as experimental and requires the D-Bus
experimental flag to be enabled.
Patch overview:
1/5 lib/uuid: Add RAS service and characteristic UUIDs
2/5 monitor: Add ATT monitor decoding for Ranging Service (RAS)
3/5 src/shared: Implement Bluetooth RAP GATT server and client
4/5 unit: Add unit tests for Ranging Profile (RAP)
5/5 profiles: Add experimental Ranging Profile (RAP) support
Makefile.am | 10 +-
Makefile.plugins | 3 +
lib/bluetooth/uuid.h | 8 +
monitor/att.c | 447 ++++++++++++++++++++-
profiles/ranging/rap.c | 333 ++++++++++++++++
src/shared/rap.c | 874 +++++++++++++++++++++++++++++++++++++++++
src/shared/rap.h | 48 +++
src/shared/util.c | 9 +-
unit/test-rap.c | 458 +++++++++++++++++++++
9 files changed, 2187 insertions(+), 3 deletions(-)
create mode 100644 profiles/ranging/rap.c
create mode 100644 src/shared/rap.c
create mode 100644 src/shared/rap.h
create mode 100644 unit/test-rap.c
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH BlueZ v1 1/5] lib/uuid: Add RAS service and characteristic UUIDs
2026-01-27 6:47 [PATCH BlueZ v1 0/5] Add Bluetooth Ranging Service (RAS) support Prathibha Madugonde
@ 2026-01-27 6:47 ` Prathibha Madugonde
2026-01-27 7:04 ` Add Bluetooth Ranging Service (RAS) support bluez.test.bot
2026-01-27 6:47 ` [PATCH BlueZ v1 2/5] monitor: Add support for Ranging Service (RAS) Prathibha Madugonde
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Prathibha Madugonde @ 2026-01-27 6:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
---
lib/bluetooth/uuid.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/bluetooth/uuid.h b/lib/bluetooth/uuid.h
index 74bd83742..bd3fdd486 100644
--- a/lib/bluetooth/uuid.h
+++ b/lib/bluetooth/uuid.h
@@ -50,6 +50,14 @@ extern "C" {
#define BATTERY_UUID "0000180f-0000-1000-8000-00805f9b34fb"
#define SCAN_PARAMETERS_UUID "00001813-0000-1000-8000-00805f9b34fb"
+#define RAS_UUID "0000185b-0000-1000-8000-00805f9b34fb"
+#define RAS_FEATURES_UUID 0x2C14
+#define RAS_REALTIME_DATA_UUID 0x2C15
+#define RAS_ONDEMAND_DATA_UUID 0x2C16
+#define RAS_CONTROL_POINT_UUID 0x2C17
+#define RAS_DATA_READY_UUID 0x2C18
+#define RAS_DATA_OVERWRITTEN_UUID 0x2C19
+
#define SAP_UUID "0000112D-0000-1000-8000-00805f9b34fb"
#define HEART_RATE_UUID "0000180d-0000-1000-8000-00805f9b34fb"
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH BlueZ v1 2/5] monitor: Add support for Ranging Service (RAS)
2026-01-27 6:47 [PATCH BlueZ v1 0/5] Add Bluetooth Ranging Service (RAS) support Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
@ 2026-01-27 6:47 ` Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 3/5] Implement the Bluetooth Ranging Profile GATT server and client support as specified by the Bluetooth SIG: Prathibha Madugonde
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Prathibha Madugonde @ 2026-01-27 6:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
Implement comprehensive decoding support for the Bluetooth Ranging
Service (RAS) in the ATT monitor, including:
- RAS Features characteristic (0x2c14) with feature bitfield decoding
- Real-time and On-demand Ranging Data characteristics (0x2c15, 0x2c16)
with segmentation header, ranging header, and subevent header parsing
- RAS Control Point (0x2c17) with command opcodes:
* Get Ranging Data
* ACK Ranging Data
* Retrieve Lost Ranging Data Segments
* Abort Operation
* Set Filter
- RAS Ranging Data Ready (0x2c18) and Data Overwritten (0x2c19)
notification characteristics
Also add RAS service and characteristic UUIDs to the shared UUID table.
This enables btmon to properly decode and display RAS protocol
operations for debugging and analysis of Bluetooth ranging
implementations.
---
monitor/att.c | 447 +++++++++++++++++++++++++++++++++++++++++++++-
src/shared/util.c | 9 +-
2 files changed, 454 insertions(+), 2 deletions(-)
diff --git a/monitor/att.c b/monitor/att.c
index abcdf15a8..24aaa264c 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -4055,6 +4055,438 @@ static void bgr_features_read(const struct l2cap_frame *frame)
mask);
}
+static const struct bitfield_data ras_features_table[] = {
+ { 0, "Real-time Ranging Data (0x00000001)" },
+ { 1, "Retrieve Lost Ranging Data Segments (0x00000002)" },
+ { 2, "Abort Operation (0x00000004)" },
+ { 3, "Filter Ranging Data (0x00000008)" },
+ { }
+};
+
+static const struct bitfield_data antenna_paths_table[] = {
+ { 0, "Antenna Path 1 (0x01)" },
+ { 1, "Antenna Path 2 (0x02)" },
+ { 2, "Antenna Path 3 (0x04)" },
+ { 3, "Antenna Path 4 (0x08)" },
+ { }
+};
+
+static void ras_features_read(const struct l2cap_frame *frame)
+{
+ uint32_t features;
+ uint32_t mask;
+
+ if (!l2cap_frame_get_le32((void *)frame, &features)) {
+ print_text(COLOR_ERROR, " Features: invalid size");
+ goto done;
+ }
+
+ print_field(" Features: 0x%8.8x", features);
+
+ mask = print_bitfield(6, features, ras_features_table);
+ if (mask)
+ print_text(COLOR_WHITE_BG, " RFU fields (0x%8.8x)",
+ mask);
+
+done:
+ if (frame->size)
+ print_hex_field(" Data", frame->data, frame->size);
+}
+
+static void print_ras_segmentation_header(uint8_t header)
+{
+ bool first_segment = header & 0x01;
+ bool last_segment = (header >> 1) & 0x01;
+ uint8_t segment_index = (header >> 2) & 0x3F;
+
+ print_field(" Segmentation Header: 0x%2.2x", header);
+ print_field(" First Segment: %s", first_segment ? "True" : "False");
+ print_field(" Last Segment: %s", last_segment ? "True" : "False");
+ print_field(" Segment Index: %u", segment_index);
+}
+
+static void print_ras_ranging_header(const struct l2cap_frame *frame)
+{
+ uint16_t ranging_counter_config;
+ uint8_t selected_tx_power;
+ uint8_t antenna_paths_mask;
+ uint8_t mask;
+
+ if (!l2cap_frame_get_le16((void *)frame, &ranging_counter_config)) {
+ print_text(COLOR_ERROR, " Ranging Header: invalid size");
+ return;
+ }
+
+ /* Lower 12 bits: Ranging Counter, Upper 4 bits: Configuration ID */
+ print_field(" Ranging Counter: 0x%3.3x",
+ ranging_counter_config & 0x0FFF);
+ print_field(" Configuration ID: %u",
+ (ranging_counter_config >> 12) & 0x0F);
+
+ if (!l2cap_frame_get_u8((void *)frame, &selected_tx_power)) {
+ print_text(COLOR_ERROR, " Selected TX Power: invalid size");
+ return;
+ }
+
+ print_field(" Selected TX Power: %d dBm", (int8_t)selected_tx_power);
+
+ if (!l2cap_frame_get_u8((void *)frame, &antenna_paths_mask)) {
+ print_text(COLOR_ERROR, " Antenna Paths Mask: invalid size");
+ return;
+ }
+
+ print_field(" Antenna Paths Mask: 0x%2.2x", antenna_paths_mask);
+
+ mask = print_bitfield(6, antenna_paths_mask,
+ antenna_paths_table);
+
+ if (mask)
+ print_text(COLOR_WHITE_BG, " RFU (0x%2.2x)", mask);
+}
+
+static const char *ras_ranging_done_status_str(uint8_t status)
+{
+ switch (status) {
+ case 0x0:
+ return "All results complete";
+ case 0x1:
+ return "Partial results, more to follow";
+ case 0xF:
+ return "All subsequent procedures aborted";
+ default:
+ return "RFU";
+ }
+}
+
+static const char *ras_subevent_done_status_str(uint8_t status)
+{
+ switch (status) {
+ case 0x0:
+ return "All results complete";
+ case 0xF:
+ return "Current subevent aborted";
+ default:
+ return "RFU";
+ }
+}
+
+static const char *ras_abort_reason_str(uint8_t reason)
+{
+ switch (reason) {
+ case 0x0:
+ return "No abort";
+ case 0x1:
+ return "Local/remote request";
+ case 0x2:
+ return "Filtered channel map < 15 channels";
+ case 0x3:
+ return "Channel map update instant passed";
+ case 0xF:
+ return "Unspecified";
+ default:
+ return "RFU";
+ }
+}
+
+static void print_ras_subevent_header(const struct l2cap_frame *frame)
+{
+ uint16_t start_acl_conn_event;
+ uint16_t freq_compensation;
+ uint8_t status_byte1, status_byte2;
+ uint8_t ranging_done_status, subevent_done_status;
+ uint8_t ranging_abort_reason, subevent_abort_reason;
+ uint8_t ref_power_level;
+ uint8_t num_steps_reported;
+
+ if (!l2cap_frame_get_le16((void *)frame, &start_acl_conn_event)) {
+ print_text(COLOR_ERROR,
+ " Start ACL Connection Event: invalid size");
+ return;
+ }
+
+ print_field(" Start ACL Connection Event: %u",
+ start_acl_conn_event);
+
+ if (!l2cap_frame_get_le16((void *)frame, &freq_compensation)) {
+ print_text(COLOR_ERROR,
+ " Frequency Compensation: invalid size");
+ return;
+ }
+
+ print_field(" Frequency Compensation: %d (0.01 ppm)",
+ (int16_t)freq_compensation);
+
+ if (!l2cap_frame_get_u8((void *)frame, &status_byte1)) {
+ print_text(COLOR_ERROR, " Status: invalid size");
+ return;
+ }
+
+ ranging_done_status = status_byte1 & 0x0F;
+ subevent_done_status = (status_byte1 >> 4) & 0x0F;
+
+ print_field(" Ranging Done Status: %s (0x%x)",
+ ras_ranging_done_status_str(ranging_done_status),
+ ranging_done_status);
+ print_field(" Subevent Done Status: %s (0x%x)",
+ ras_subevent_done_status_str(subevent_done_status),
+ subevent_done_status);
+
+ if (!l2cap_frame_get_u8((void *)frame, &status_byte2)) {
+ print_text(COLOR_ERROR, " Abort Reasons: invalid size");
+ return;
+ }
+
+ ranging_abort_reason = status_byte2 & 0x0F;
+ subevent_abort_reason = (status_byte2 >> 4) & 0x0F;
+
+ print_field(" Ranging Abort Reason: %s (0x%x)",
+ ras_abort_reason_str(ranging_abort_reason),
+ ranging_abort_reason);
+ print_field(" Subevent Abort Reason: %s (0x%x)",
+ ras_abort_reason_str(subevent_abort_reason),
+ subevent_abort_reason);
+
+ if (!l2cap_frame_get_u8((void *)frame, &ref_power_level)) {
+ print_text(COLOR_ERROR,
+ " Reference Power Level: invalid size");
+ return;
+ }
+
+ print_field(" Reference Power Level: %d dBm",
+ (int8_t)ref_power_level);
+
+ if (!l2cap_frame_get_u8((void *)frame, &num_steps_reported)) {
+ print_text(COLOR_ERROR,
+ " Number of Steps Reported: invalid size");
+ return;
+ }
+
+ print_field(" Number of Steps Reported: %u", num_steps_reported);
+}
+
+static void ras_ranging_data_read(const struct l2cap_frame *frame)
+{
+ uint8_t seg_header;
+ bool first_segment;
+
+ if (!l2cap_frame_get_u8((void *)frame, &seg_header)) {
+ print_text(COLOR_ERROR, " Segmentation Header: invalid size");
+ goto done;
+ }
+
+ print_ras_segmentation_header(seg_header);
+
+ first_segment = seg_header & 0x01;
+
+ /* Only try to decode headers if this is the first segment */
+ if (first_segment && frame->size >= 6) {
+ print_field(" Ranging Data Body:");
+ print_ras_ranging_header(frame);
+
+ /* Try to decode subevent header if enough data remains */
+ if (frame->size >= 10) {
+ print_field(" Subevent #0:");
+ print_ras_subevent_header(frame);
+ }
+ }
+
+ if (frame->size > 0) {
+ print_hex_field(" Remaining Ranging Data Segment", frame->data,
+ frame->size);
+ }
+
+done:
+ if (frame->size)
+ print_hex_field(" Remaining Data", frame->data, frame->size);
+}
+
+static void ras_ranging_data_notify(const struct l2cap_frame *frame)
+{
+ ras_ranging_data_read(frame);
+}
+
+static bool ras_get_ranging_data_cmd(const struct l2cap_frame *frame)
+{
+ uint16_t ranging_counter;
+
+ if (!l2cap_frame_get_le16((void *)frame, &ranging_counter)) {
+ print_text(COLOR_ERROR, " Ranging Counter: invalid size");
+ return false;
+ }
+
+ print_field(" Ranging Counter: 0x%4.4x", ranging_counter);
+
+ return true;
+}
+
+static bool ras_ack_ranging_data_cmd(const struct l2cap_frame *frame)
+{
+ uint16_t ranging_counter;
+
+ if (!l2cap_frame_get_le16((void *)frame, &ranging_counter)) {
+ print_text(COLOR_ERROR, " Ranging Counter: invalid size");
+ return false;
+ }
+
+ print_field(" Ranging Counter: 0x%4.4x", ranging_counter);
+
+ return true;
+}
+
+static bool ras_retrieve_lost_segments_cmd(const struct l2cap_frame *frame)
+{
+ uint16_t ranging_counter;
+ uint8_t first_segment, last_segment;
+
+ if (!l2cap_frame_get_le16((void *)frame, &ranging_counter)) {
+ print_text(COLOR_ERROR, " Ranging Counter: invalid size");
+ return false;
+ }
+
+ print_field(" Ranging Counter: 0x%4.4x", ranging_counter);
+
+ if (!l2cap_frame_get_u8((void *)frame, &first_segment)) {
+ print_text(COLOR_ERROR,
+ " First Segment Index: invalid size");
+ return false;
+ }
+
+ print_field(" First Segment Index: %u", first_segment);
+
+ if (!l2cap_frame_get_u8((void *)frame, &last_segment)) {
+ print_text(COLOR_ERROR, " Last Segment Index: invalid size");
+ return false;
+ }
+
+ if (last_segment == 0xFF)
+ print_field(" Last Segment Index: All remaining (0xFF)");
+ else
+ print_field(" Last Segment Index: %u", last_segment);
+
+ return true;
+}
+
+static bool ras_set_filter_cmd(const struct l2cap_frame *frame)
+{
+ uint16_t filter_config;
+ uint8_t mode;
+ uint16_t filter_mask;
+
+ if (!l2cap_frame_get_le16((void *)frame, &filter_config)) {
+ print_text(COLOR_ERROR,
+ " Filter Configuration: invalid size");
+ return false;
+ }
+
+ mode = filter_config & 0x03;
+ filter_mask = (filter_config >> 2) & 0x3FFF;
+
+ print_field(" Filter Configuration: 0x%4.4x", filter_config);
+ print_field(" Mode: %u", mode);
+ print_field(" Filter Bit Mask: 0x%4.4x", filter_mask);
+
+ return true;
+}
+
+#define RAS_CMD(_op, _desc, _func) \
+[_op] = { \
+ .desc = _desc, \
+ .func = _func, \
+}
+
+static const struct ras_cmd {
+ const char *desc;
+ bool (*func)(const struct l2cap_frame *frame);
+} ras_cmd_table[] = {
+ /* Opcode = 0x00 (Get Ranging Data) */
+ RAS_CMD(0x00, "Get Ranging Data", ras_get_ranging_data_cmd),
+ /* Opcode = 0x01 (ACK Ranging Data) */
+ RAS_CMD(0x01, "ACK Ranging Data", ras_ack_ranging_data_cmd),
+ /* Opcode = 0x02 (Retrieve Lost Ranging Data Segments) */
+ RAS_CMD(0x02, "Retrieve Lost Ranging Data Segments",
+ ras_retrieve_lost_segments_cmd),
+ /* Opcode = 0x03 (Abort Operation) */
+ RAS_CMD(0x03, "Abort Operation", NULL),
+ /* Opcode = 0x04 (Set Filter) */
+ RAS_CMD(0x04, "Set Filter", ras_set_filter_cmd),
+};
+
+static const struct ras_cmd *ras_get_cmd(uint8_t op)
+{
+ if (op > ARRAY_SIZE(ras_cmd_table))
+ return NULL;
+
+ return &ras_cmd_table[op];
+}
+
+static void ras_control_point_write(const struct l2cap_frame *frame)
+{
+ uint8_t opcode;
+ const struct ras_cmd *cmd;
+
+ if (!l2cap_frame_get_u8((void *)frame, &opcode)) {
+ print_text(COLOR_ERROR, " Opcode: invalid size");
+ goto done;
+ }
+
+ cmd = ras_get_cmd(opcode);
+ if (!cmd) {
+ print_field(" Opcode: Reserved (0x%2.2x)", opcode);
+ goto done;
+ }
+
+ print_field(" Opcode: %s (0x%2.2x)", cmd->desc, opcode);
+
+ if (cmd->func && !cmd->func(frame))
+ goto done;
+
+done:
+ if (frame->size)
+ print_hex_field(" Data", frame->data, frame->size);
+}
+
+static void ras_data_ready_read(const struct l2cap_frame *frame)
+{
+ uint16_t counter;
+
+ if (!l2cap_frame_get_le16((void *)frame, &counter)) {
+ print_text(COLOR_ERROR, " Counter: invalid size");
+ goto done;
+ }
+
+ print_field(" Counter: %u", counter);
+
+done:
+ if (frame->size)
+ print_hex_field(" Data", frame->data, frame->size);
+}
+
+static void ras_data_ready_notify(const struct l2cap_frame *frame)
+{
+ ras_data_ready_read(frame);
+}
+
+static void ras_data_overwritten_read(const struct l2cap_frame *frame)
+{
+ uint16_t counter;
+
+ if (!l2cap_frame_get_le16((void *)frame, &counter)) {
+ print_text(COLOR_ERROR, " Counter: invalid size");
+ goto done;
+ }
+
+ print_field(" Overwritten Count: %u", counter);
+
+done:
+ if (frame->size)
+ print_hex_field(" Data", frame->data, frame->size);
+}
+
+static void ras_data_overwritten_notify(const struct l2cap_frame *frame)
+{
+ ras_data_overwritten_read(frame);
+}
+
#define GMAS \
GATT_HANDLER(0x2c00, gmap_role_read, NULL, NULL), \
GATT_HANDLER(0x2c01, ugg_features_read, NULL, NULL), \
@@ -4062,6 +4494,18 @@ static void bgr_features_read(const struct l2cap_frame *frame)
GATT_HANDLER(0x2c02, bgs_features_read, NULL, NULL), \
GATT_HANDLER(0x2c03, bgr_features_read, NULL, NULL)
+#define RAS \
+ GATT_HANDLER(0x2c14, ras_features_read, NULL, NULL), \
+ GATT_HANDLER(0x2c15, ras_ranging_data_read, NULL, \
+ ras_ranging_data_notify), \
+ GATT_HANDLER(0x2c16, ras_ranging_data_read, NULL, \
+ ras_ranging_data_notify), \
+ GATT_HANDLER(0x2c17, NULL, ras_control_point_write, NULL), \
+ GATT_HANDLER(0x2c18, ras_data_ready_read, NULL, \
+ ras_data_ready_notify), \
+ GATT_HANDLER(0x2c19, ras_data_overwritten_read, NULL, \
+ ras_data_overwritten_notify)
+
#define GATT_HANDLER(_uuid, _read, _write, _notify) \
{ \
.uuid = { \
@@ -4144,7 +4588,8 @@ static const struct gatt_handler {
GATT_HANDLER(0x2bc1, incoming_call_read, NULL, incoming_call_notify),
GATT_HANDLER(0x2bc2, call_friendly_name_read, NULL,
call_friendly_name_notify),
- GMAS
+ GMAS,
+ RAS
};
static const struct gatt_handler *get_handler_uuid(const bt_uuid_t *uuid)
diff --git a/src/shared/util.c b/src/shared/util.c
index 6f7ce0a25..07e718bca 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -844,7 +844,8 @@ static const struct {
{ 0x1855, "Telephony and Media Audio" },
{ 0x1856, "Public Broadcast Announcement" },
{ 0x1858, "Gaming Audio" },
- /* 0x1857 to 0x27ff undefined */
+ { 0x185b, "Ranging Service" },
+ /* 0x185c to 0x27ff undefined */
{ 0x2800, "Primary Service" },
{ 0x2801, "Secondary Service" },
{ 0x2802, "Include" },
@@ -1157,6 +1158,12 @@ static const struct {
{ 0x2c02, "UGT Features" },
{ 0x2c03, "BGS Features" },
{ 0x2c03, "BGR Features" },
+ { 0x2c14, "RAS Features" },
+ { 0x2c15, "RAS Real-time Ranging Data" },
+ { 0x2c16, "RAS On-demand Ranging Data" },
+ { 0x2c17, "RAS Control Point" },
+ { 0x2c18, "RAS Ranging Data Ready" },
+ { 0x2c19, "RAS Ranging Data Overwritten" },
/* vendor defined */
{ 0xfeff, "GN Netcom" },
{ 0xfefe, "GN ReSound A/S" },
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH BlueZ v1 3/5] Implement the Bluetooth Ranging Profile GATT server and client support as specified by the Bluetooth SIG:
2026-01-27 6:47 [PATCH BlueZ v1 0/5] Add Bluetooth Ranging Service (RAS) support Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 2/5] monitor: Add support for Ranging Service (RAS) Prathibha Madugonde
@ 2026-01-27 6:47 ` Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 4/5] unit: Add test cases for Ranging Profile (RAP) Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 5/5] profiles: Add Ranging Profile (RAP) implementation Prathibha Madugonde
4 siblings, 0 replies; 10+ messages in thread
From: Prathibha Madugonde @ 2026-01-27 6:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
Add RAS service, characteristics, and descriptors to the local GATT DB
Implement server-side callbacks for RAS Features, Procedure Data,
Data Ready and Data Overwritten characteristics
Add client-side session handling, notification registration and
ready callbacks
Wire RAS attachment/detachment to ATT/GATT client and server
---
Makefile.am | 4 +-
src/shared/rap.c | 874 +++++++++++++++++++++++++++++++++++++++++++++++
src/shared/rap.h | 48 +++
3 files changed, 925 insertions(+), 1 deletion(-)
create mode 100644 src/shared/rap.c
create mode 100644 src/shared/rap.h
diff --git a/Makefile.am b/Makefile.am
index 2217bcf15..cff5cc034 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -248,7 +248,9 @@ shared_sources = src/shared/io.h src/shared/timeout.h \
src/shared/bap-defs.h \
src/shared/asha.h src/shared/asha.c \
src/shared/battery.h src/shared/battery.c \
- src/shared/uinput.h src/shared/uinput.c
+ src/shared/uinput.h src/shared/uinput.c \
+ src/shared/rap.h src/shared/rap.c
+
if READLINE
shared_sources += src/shared/shell.c src/shared/shell.h
diff --git a/src/shared/rap.c b/src/shared/rap.c
new file mode 100644
index 000000000..605963c92
--- /dev/null
+++ b/src/shared/rap.c
@@ -0,0 +1,874 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/*
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#define _GNU_SOURCE
+#include <inttypes.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <errno.h>
+#include <glib.h>
+
+#include "bluetooth/bluetooth.h"
+#include "bluetooth/uuid.h"
+
+#include "src/shared/queue.h"
+#include "src/shared/util.h"
+#include "src/shared/timeout.h"
+#include "src/shared/att.h"
+#include "src/shared/gatt-db.h"
+#include "src/shared/gatt-server.h"
+#include "src/shared/gatt-client.h"
+#include "src/shared/rap.h"
+
+#define DBG(_rap, fmt, arg...) \
+ rap_debug(_rap, "%s:%s() " fmt, __FILE__, __func__, ## arg)
+
+#define RAS_UUID16 0x185B
+
+/* Total number of attribute handles reserved for the RAS service */
+#define RAS_TOTAL_NUM_HANDLES 18
+
+/* Ranging Service context */
+struct ras {
+ struct bt_rap_db *rapdb;
+
+ /* Service and characteristic attributes */
+ struct gatt_db_attribute *svc;
+ struct gatt_db_attribute *feat_chrc;
+ struct gatt_db_attribute *realtime_chrc;
+ struct gatt_db_attribute *realtime_chrc_ccc;
+ struct gatt_db_attribute *ondemand_chrc;
+ struct gatt_db_attribute *cp_chrc;
+ struct gatt_db_attribute *ready_chrc;
+ struct gatt_db_attribute *overwritten_chrc;
+};
+
+struct bt_rap_db {
+ struct gatt_db *db;
+ struct ras *ras;
+};
+
+struct bt_rap {
+ int ref_count;
+ struct bt_rap_db *lrapdb;
+ struct bt_rap_db *rrapdb;
+ struct bt_gatt_client *client;
+ struct bt_att *att;
+
+ unsigned int idle_id;
+
+ struct queue *notify;
+ struct queue *pending;
+ struct queue *ready_cbs;
+
+ bt_rap_debug_func_t debug_func;
+ bt_rap_destroy_func_t debug_destroy;
+ void *debug_data;
+ void *user_data;
+};
+
+static struct queue *rap_db;
+static struct queue *bt_rap_cbs;
+static struct queue *sessions;
+
+struct bt_rap_cb {
+ unsigned int id;
+ bt_rap_func_t attached;
+ bt_rap_func_t detached;
+ void *user_data;
+};
+
+typedef void (*rap_func_t)(struct bt_rap *rap, bool success,
+ uint8_t att_ecode, const uint8_t *value,
+ uint16_t length, void *user_data);
+
+struct bt_rap_pending {
+ unsigned int id;
+ struct bt_rap *rap;
+ rap_func_t func;
+ void *userdata;
+};
+
+struct bt_rap_ready {
+ unsigned int id;
+ bt_rap_ready_func_t func;
+ bt_rap_destroy_func_t destroy;
+ void *data;
+};
+
+typedef void (*rap_notify_t)(struct bt_rap *rap, uint16_t value_handle,
+ const uint8_t *value, uint16_t length,
+ void *user_data);
+
+struct bt_rap_notify {
+ unsigned int id;
+ struct bt_rap *rap;
+ rap_notify_t func;
+ void *user_data;
+};
+
+static bool real_time_enabled;
+static bool on_demand_enabled;
+struct gatt_db_attribute *global_real_time_char;
+struct gatt_db_attribute *global_on_demand_char;
+struct gatt_db_attribute *global_data_ready_char;
+struct gatt_db_attribute *global_data_overwritten_char;
+struct gatt_db_attribute *global_control_point_char;
+
+static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
+{
+ if (!rap)
+ return NULL;
+
+ if (rap->lrapdb)
+ return rap->lrapdb;
+
+ return NULL;
+}
+
+struct ras *rap_get_ras(struct bt_rap *rap)
+{
+ if (!rap)
+ return NULL;
+
+ if (rap->rrapdb->ras)
+ return rap->rrapdb->ras;
+
+ rap->rrapdb->ras = new0(struct ras, 1);
+ rap->rrapdb->ras->rapdb = rap->rrapdb;
+
+ return rap->rrapdb->ras;
+}
+
+static void rap_detached(void *data, void *user_data)
+{
+ struct bt_rap_cb *cb = data;
+ struct bt_rap *rap = user_data;
+
+ cb->detached(rap, cb->user_data);
+}
+
+void bt_rap_detach(struct bt_rap *rap)
+{
+ if (!queue_remove(sessions, rap))
+ return;
+
+ bt_gatt_client_idle_unregister(rap->client, rap->idle_id);
+ bt_gatt_client_unref(rap->client);
+ rap->client = NULL;
+
+ queue_foreach(bt_rap_cbs, rap_detached, rap);
+}
+
+static void rap_db_free(void *data)
+{
+ struct bt_rap_db *rapdb = data;
+
+ if (!rapdb)
+ return;
+
+ gatt_db_unref(rapdb->db);
+
+ free(rapdb->ras);
+ free(rapdb);
+}
+
+static void rap_ready_free(void *data)
+{
+ struct bt_rap_ready *ready = data;
+
+ if (ready->destroy)
+ ready->destroy(ready->data);
+
+ free(ready);
+}
+
+static void rap_free(void *data)
+{
+ struct bt_rap *rap = data;
+
+ bt_rap_detach(rap);
+
+ rap_db_free(rap->rrapdb);
+
+ queue_destroy(rap->notify, free);
+ queue_destroy(rap->pending, NULL);
+ queue_destroy(rap->ready_cbs, rap_ready_free);
+
+ free(rap);
+}
+
+bool bt_rap_set_user_data(struct bt_rap *rap, void *user_data)
+{
+ if (!rap)
+ return false;
+
+ rap->user_data = user_data;
+
+ return true;
+}
+
+static bool rap_db_match(const void *data, const void *match_data)
+{
+ const struct bt_rap_db *rapdb = data;
+ const struct gatt_db *db = match_data;
+
+ return rapdb->db == db;
+}
+
+struct bt_att *bt_rap_get_att(struct bt_rap *rap)
+{
+ if (!rap)
+ return NULL;
+
+ if (rap->att)
+ return rap->att;
+
+ return bt_gatt_client_get_att(rap->client);
+}
+
+struct bt_rap *bt_rap_ref(struct bt_rap *rap)
+{
+ if (!rap)
+ return NULL;
+
+ __sync_fetch_and_add(&rap->ref_count, 1);
+
+ return rap;
+}
+
+void bt_rap_unref(struct bt_rap *rap)
+{
+ if (!rap)
+ return;
+
+ if (__sync_sub_and_fetch(&rap->ref_count, 1))
+ return;
+
+ rap_free(rap);
+}
+
+static void rap_debug(struct bt_rap *rap, const char *format, ...)
+{
+ va_list ap;
+
+ if (!rap || !format || !rap->debug_func)
+ return;
+
+ va_start(ap, format);
+ util_debug_va(rap->debug_func, rap->debug_data, format, ap);
+ va_end(ap);
+}
+
+bool bt_rap_set_debug(struct bt_rap *rap, bt_rap_debug_func_t func,
+ void *user_data, bt_rap_destroy_func_t destroy)
+{
+ if (!rap)
+ return false;
+
+ if (rap->debug_destroy)
+ rap->debug_destroy(rap->debug_data);
+
+ rap->debug_func = func;
+ rap->debug_destroy = destroy;
+ rap->debug_data = user_data;
+
+ return true;
+}
+
+static void ras_features_read_cb(struct gatt_db_attribute *attrib,
+ unsigned int id, uint16_t offset,
+ uint8_t opcode, struct bt_att *att,
+ void *user_data)
+{
+ /*
+ * Feature mask: bits 0-2 set:
+ * - Real-time ranging
+ * - Retrieve stored results
+ * - Abort operation
+ */
+ uint8_t value[4] = { 0x01, 0x00, 0x00, 0x00 };
+
+ gatt_db_attribute_read_result(attrib, id, 0, value, sizeof(value));
+}
+
+static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
+ unsigned int id, uint16_t offset,
+ uint8_t opcode, struct bt_att *att,
+ void *user_data)
+{
+ /* No static read data; real-time data is provided via notifications. */
+ gatt_db_attribute_read_result(attrib, id, 0, NULL, 0);
+}
+
+static void ras_ondemand_read_cb(struct gatt_db_attribute *attrib,
+ unsigned int id, uint16_t offset,
+ uint8_t opcode, struct bt_att *att,
+ void *user_data)
+{
+ /* No static read data – on‑demand data is pushed via
+ * notifications
+ */
+ gatt_db_attribute_read_result(attrib, id, 0, NULL, 0);
+}
+
+/*
+ * Control point handler.
+ * Parses the opcode and acts on queued data (implementation TBD).
+ */
+static void ras_control_point_write_cb(struct gatt_db_attribute *attrib,
+ unsigned int id, uint16_t offset,
+ const uint8_t *value, size_t len,
+ uint8_t opcode, struct bt_att *att,
+ void *user_data)
+{
+ /* Control point handler - implementation TBD */
+}
+
+/* Data Ready – returns the latest ranging counter. */
+static void ras_data_ready_read_cb(struct gatt_db_attribute *attrib,
+ unsigned int id, uint16_t offset,
+ uint8_t opcode, struct bt_att *att,
+ void *user_data)
+{
+ uint16_t counter = 0;
+ uint8_t value[2];
+
+ put_le16(counter, value);
+ gatt_db_attribute_read_result(attrib, id, 0, value, sizeof(value));
+}
+
+/* Data Overwritten – indicates how many results were overwritten. */
+static void ras_data_overwritten_read_cb(struct gatt_db_attribute *attrib,
+ unsigned int id, uint16_t offset,
+ uint8_t opcode, struct bt_att *att,
+ void *user_data)
+{
+ uint8_t value[2] = { 0x00, 0x00 };
+
+ gatt_db_attribute_read_result(attrib, id, 0, value, sizeof(value));
+}
+
+/* Service registration – store attribute pointers */
+static struct ras *register_ras_service(struct gatt_db *db)
+{
+ struct ras *ras;
+ struct gatt_db_attribute *service;
+ bt_uuid_t uuid;
+
+ if (!db)
+ return NULL;
+
+ ras = new0(struct ras, 1);
+ if (!ras)
+ return NULL;
+
+ /* Primary RAS service */
+ bt_uuid16_create(&uuid, RAS_UUID16);
+ service = gatt_db_add_service(db, &uuid, true, RAS_TOTAL_NUM_HANDLES);
+ if (!service) {
+ free(ras);
+ return NULL;
+ }
+
+ ras->svc = service;
+
+ /* RAS Features */
+ bt_uuid16_create(&uuid, RAS_FEATURES_UUID);
+ ras->feat_chrc =
+ gatt_db_service_add_characteristic(ras->svc, &uuid,
+ BT_ATT_PERM_READ |
+ BT_ATT_PERM_READ_ENCRYPT,
+ BT_GATT_CHRC_PROP_READ,
+ ras_features_read_cb,
+ NULL, ras);
+
+ /* Real-time Ranging Data */
+ bt_uuid16_create(&uuid, RAS_REALTIME_DATA_UUID);
+ ras->realtime_chrc =
+ gatt_db_service_add_characteristic(ras->svc, &uuid,
+ BT_ATT_PERM_READ |
+ BT_ATT_PERM_READ_ENCRYPT,
+ BT_GATT_CHRC_PROP_NOTIFY |
+ BT_GATT_CHRC_PROP_INDICATE,
+ NULL, NULL, ras);
+
+ ras->realtime_chrc_ccc =
+ gatt_db_service_add_ccc(ras->svc,
+ BT_ATT_PERM_READ |
+ BT_ATT_PERM_WRITE);
+
+ /* On-demand Ranging Data */
+ bt_uuid16_create(&uuid, RAS_ONDEMAND_DATA_UUID);
+ ras->ondemand_chrc =
+ gatt_db_service_add_characteristic(ras->svc, &uuid,
+ BT_ATT_PERM_READ |
+ BT_ATT_PERM_READ_ENCRYPT,
+ BT_GATT_CHRC_PROP_NOTIFY |
+ BT_GATT_CHRC_PROP_INDICATE,
+ ras_ondemand_read_cb, NULL,
+ ras);
+
+ gatt_db_service_add_ccc(ras->svc,
+ BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
+
+ /* RAS Control Point */
+ bt_uuid16_create(&uuid, RAS_CONTROL_POINT_UUID);
+ ras->cp_chrc =
+ gatt_db_service_add_characteristic(ras->svc, &uuid,
+ BT_ATT_PERM_WRITE |
+ BT_ATT_PERM_WRITE_ENCRYPT,
+ BT_GATT_CHRC_PROP_WRITE_WITHOUT_RESP |
+ BT_GATT_CHRC_PROP_INDICATE,
+ NULL,
+ ras_control_point_write_cb,
+ ras);
+
+ gatt_db_service_add_ccc(ras->svc,
+ BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
+
+ /* RAS Data Ready */
+ bt_uuid16_create(&uuid, RAS_DATA_READY_UUID);
+ ras->ready_chrc =
+ gatt_db_service_add_characteristic(ras->svc, &uuid,
+ BT_ATT_PERM_READ |
+ BT_ATT_PERM_READ_ENCRYPT,
+ BT_GATT_CHRC_PROP_READ |
+ BT_GATT_CHRC_PROP_NOTIFY |
+ BT_GATT_CHRC_PROP_INDICATE,
+ ras_data_ready_read_cb, NULL,
+ ras);
+
+ gatt_db_service_add_ccc(ras->svc,
+ BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
+
+ /* RAS Data Overwritten */
+ bt_uuid16_create(&uuid, RAS_DATA_OVERWRITTEN_UUID);
+ ras->overwritten_chrc =
+ gatt_db_service_add_characteristic(ras->svc, &uuid,
+ BT_ATT_PERM_READ |
+ BT_ATT_PERM_READ_ENCRYPT,
+ BT_GATT_CHRC_PROP_READ |
+ BT_GATT_CHRC_PROP_NOTIFY |
+ BT_GATT_CHRC_PROP_INDICATE,
+ ras_data_overwritten_read_cb,
+ NULL, ras);
+
+ gatt_db_service_add_ccc(ras->svc,
+ BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
+
+ /* Activate the service */
+ gatt_db_service_set_active(ras->svc, true);
+
+ return ras;
+}
+
+static struct bt_rap_db *rap_db_new(struct gatt_db *db)
+{
+ struct bt_rap_db *rapdb;
+
+ if (!db)
+ return NULL;
+
+ rapdb = new0(struct bt_rap_db, 1);
+ if (!rapdb)
+ return NULL;
+
+ rapdb->db = gatt_db_ref(db);
+
+ if (!rap_db)
+ rap_db = queue_new();
+
+ rapdb->ras = register_ras_service(db);
+ if (rapdb->ras)
+ rapdb->ras->rapdb = rapdb;
+
+ queue_push_tail(rap_db, rapdb);
+
+ return rapdb;
+}
+
+static struct bt_rap_db *rap_get_db(struct gatt_db *db)
+{
+ struct bt_rap_db *rapdb;
+
+ rapdb = queue_find(rap_db, rap_db_match, db);
+ if (rapdb)
+ return rapdb;
+
+ return rap_db_new(db);
+}
+
+void bt_rap_add_db(struct gatt_db *db)
+{
+ rap_db_new(db);
+}
+
+unsigned int bt_rap_register(bt_rap_func_t attached, bt_rap_func_t detached,
+ void *user_data)
+{
+ struct bt_rap_cb *cb;
+ static unsigned int id;
+
+ if (!attached && !detached)
+ return 0;
+
+ if (!bt_rap_cbs)
+ bt_rap_cbs = queue_new();
+
+ cb = new0(struct bt_rap_cb, 1);
+ cb->id = ++id ? id : ++id;
+ cb->attached = attached;
+ cb->detached = detached;
+ cb->user_data = user_data;
+
+ queue_push_tail(bt_rap_cbs, cb);
+
+ return cb->id;
+}
+
+static bool match_id(const void *data, const void *match_data)
+{
+ const struct bt_rap_cb *cb = data;
+ unsigned int id = PTR_TO_UINT(match_data);
+
+ return cb->id == id;
+}
+
+bool bt_rap_unregister(unsigned int id)
+{
+ struct bt_rap_cb *cb;
+
+ cb = queue_remove_if(bt_rap_cbs, match_id, UINT_TO_PTR(id));
+ if (!cb)
+ return false;
+
+ free(cb);
+
+ return true;
+}
+
+struct bt_rap *bt_rap_new(struct gatt_db *ldb, struct gatt_db *rdb)
+{
+ struct bt_rap *rap;
+ struct bt_rap_db *rapdb;
+
+ if (!ldb)
+ return NULL;
+
+ rapdb = rap_get_db(ldb);
+ if (!rapdb)
+ return NULL;
+
+ rap = new0(struct bt_rap, 1);
+ rap->lrapdb = rapdb;
+ rap->pending = queue_new();
+ rap->ready_cbs = queue_new();
+ rap->notify = queue_new();
+
+ if (!rdb)
+ goto done;
+
+ rapdb = new0(struct bt_rap_db, 1);
+ rapdb->db = gatt_db_ref(rdb);
+
+ rap->rrapdb = rapdb;
+
+done:
+ bt_rap_ref(rap);
+
+ return rap;
+}
+
+static void rap_pending_destroy(void *data)
+{
+ struct bt_rap_pending *pending = data;
+ struct bt_rap *rap = pending->rap;
+
+ if (queue_remove_if(rap->pending, NULL, pending))
+ free(pending);
+}
+
+static void rap_pending_complete(bool success, uint8_t att_ecode,
+ const uint8_t *value, uint16_t length,
+ void *user_data)
+{
+ struct bt_rap_pending *pending = user_data;
+
+ if (pending->func)
+ pending->func(pending->rap, success, att_ecode, value,
+ length, pending->userdata);
+}
+
+static void rap_register(uint16_t att_ecode, void *user_data)
+{
+ struct bt_rap_notify *notify = user_data;
+
+ if (att_ecode)
+ DBG(notify->rap, "RAS register failed 0x%04x", att_ecode);
+}
+
+static void rap_notify(uint16_t value_handle, const uint8_t *value,
+ uint16_t length, void *user_data)
+{
+ struct bt_rap_notify *notify = user_data;
+
+ if (notify->func)
+ notify->func(notify->rap, value_handle, value, length,
+ notify->user_data);
+}
+
+static void rap_notify_destroy(void *data)
+{
+ struct bt_rap_notify *notify = data;
+ struct bt_rap *rap = notify->rap;
+
+ if (queue_remove_if(rap->notify, NULL, notify))
+ free(notify);
+}
+
+static unsigned int bt_rap_register_notify(struct bt_rap *rap,
+ uint16_t value_handle,
+ rap_notify_t func,
+ void *user_data)
+{
+ struct bt_rap_notify *notify;
+
+ notify = new0(struct bt_rap_notify, 1);
+ notify->rap = rap;
+ notify->func = func;
+ notify->user_data = user_data;
+
+ notify->id = bt_gatt_client_register_notify(rap->client,
+ value_handle,
+ rap_register,
+ rap_notify,
+ notify,
+ rap_notify_destroy);
+ if (!notify->id) {
+ DBG(rap, "Unable to register for notifications");
+ free(notify);
+ return 0;
+ }
+
+ queue_push_tail(rap->notify, notify);
+
+ return notify->id;
+}
+
+static void foreach_rap_char(struct gatt_db_attribute *attr, void *user_data)
+{
+ struct bt_rap *rap = user_data;
+ uint16_t value_handle;
+ bt_uuid_t uuid;
+ bt_uuid_t uuid_features;
+ bt_uuid_t uuid_realtime;
+ bt_uuid_t uuid_ondemand;
+ bt_uuid_t uuid_cp;
+ bt_uuid_t uuid_dataready;
+ bt_uuid_t uuid_overwritten;
+ struct ras *ras;
+
+ if (!gatt_db_attribute_get_char_data(attr, NULL, &value_handle,
+ NULL, NULL, &uuid))
+ return;
+
+ bt_uuid16_create(&uuid_features, RAS_FEATURES_UUID);
+ bt_uuid16_create(&uuid_realtime, RAS_REALTIME_DATA_UUID);
+ bt_uuid16_create(&uuid_ondemand, RAS_ONDEMAND_DATA_UUID);
+ bt_uuid16_create(&uuid_cp, RAS_CONTROL_POINT_UUID);
+ bt_uuid16_create(&uuid_dataready, RAS_DATA_READY_UUID);
+ bt_uuid16_create(&uuid_overwritten, RAS_DATA_OVERWRITTEN_UUID);
+
+ if (!bt_uuid_cmp(&uuid, &uuid_features)) {
+ DBG(rap, "Features characteristic found: handle 0x%04x",
+ value_handle);
+
+ ras = rap_get_ras(rap);
+ if (!ras || ras->feat_chrc)
+ return;
+
+ ras->feat_chrc = attr;
+ }
+
+ if (!bt_uuid_cmp(&uuid, &uuid_realtime)) {
+ DBG(rap, "Real Time Data characteristic found: handle 0x%04x",
+ value_handle);
+
+ ras = rap_get_ras(rap);
+ if (!ras || ras->realtime_chrc)
+ return;
+
+ ras->realtime_chrc = attr;
+ }
+
+ if (!bt_uuid_cmp(&uuid, &uuid_ondemand)) {
+ DBG(rap, "On-demand Data characteristic found: handle 0x%04x",
+ value_handle);
+
+ ras = rap_get_ras(rap);
+ if (!ras || ras->ondemand_chrc)
+ return;
+
+ ras->ondemand_chrc = attr;
+ }
+
+ if (!bt_uuid_cmp(&uuid, &uuid_cp)) {
+ DBG(rap, "Control Point characteristic found: handle 0x%04x",
+ value_handle);
+
+ ras = rap_get_ras(rap);
+ if (!ras || ras->cp_chrc)
+ return;
+
+ ras->cp_chrc = attr;
+ }
+
+ if (!bt_uuid_cmp(&uuid, &uuid_dataready)) {
+ DBG(rap, "Data Ready characteristic found: handle 0x%04x",
+ value_handle);
+
+ ras = rap_get_ras(rap);
+ if (!ras || ras->ready_chrc)
+ return;
+
+ ras->ready_chrc = attr;
+ }
+
+ if (!bt_uuid_cmp(&uuid, &uuid_overwritten)) {
+ DBG(rap, "Overwritten characteristic found: handle 0x%04x",
+ value_handle);
+
+ ras = rap_get_ras(rap);
+ if (!ras || ras->overwritten_chrc)
+ return;
+
+ ras->overwritten_chrc = attr;
+ }
+}
+
+static void foreach_rap_service(struct gatt_db_attribute *attr,
+ void *user_data)
+{
+ struct bt_rap *rap = user_data;
+ struct ras *ras = rap_get_ras(rap);
+
+ ras->svc = attr;
+
+ gatt_db_service_set_claimed(attr, true);
+
+ gatt_db_service_foreach_char(attr, foreach_rap_char, rap);
+}
+
+unsigned int bt_rap_ready_register(struct bt_rap *rap,
+ bt_rap_ready_func_t func, void *user_data,
+ bt_rap_destroy_func_t destroy)
+{
+ struct bt_rap_ready *ready;
+ static unsigned int id;
+
+ if (!rap)
+ return 0;
+
+ DBG(rap, "bt_rap_ready_register");
+
+ ready = new0(struct bt_rap_ready, 1);
+ ready->id = ++id ? id : ++id;
+ ready->func = func;
+ ready->destroy = destroy;
+ ready->data = user_data;
+
+ queue_push_tail(rap->ready_cbs, ready);
+
+ return ready->id;
+}
+
+static bool match_ready_id(const void *data, const void *match_data)
+{
+ const struct bt_rap_ready *ready = data;
+ unsigned int id = PTR_TO_UINT(match_data);
+
+ return ready->id == id;
+}
+
+bool bt_rap_ready_unregister(struct bt_rap *rap, unsigned int id)
+{
+ struct bt_rap_ready *ready;
+
+ ready = queue_remove_if(rap->ready_cbs, match_ready_id,
+ UINT_TO_PTR(id));
+ if (!ready)
+ return false;
+
+ rap_ready_free(ready);
+
+ return true;
+}
+
+static struct bt_rap *bt_rap_ref_safe(struct bt_rap *rap)
+{
+ if (!rap || !rap->ref_count)
+ return NULL;
+
+ return bt_rap_ref(rap);
+}
+
+static void rap_notify_ready(struct bt_rap *rap)
+{
+ const struct queue_entry *entry;
+
+ if (!bt_rap_ref_safe(rap))
+ return;
+
+ for (entry = queue_get_entries(rap->ready_cbs); entry;
+ entry = entry->next) {
+ struct bt_rap_ready *ready = entry->data;
+
+ ready->func(rap, ready->data);
+ }
+
+ bt_rap_unref(rap);
+}
+
+static void rap_idle(void *data)
+{
+ struct bt_rap *rap = data;
+
+ rap->idle_id = 0;
+ rap_notify_ready(rap);
+}
+
+bool bt_rap_attach(struct bt_rap *rap, struct bt_gatt_client *client)
+{
+ bt_uuid_t uuid;
+
+ if (!sessions)
+ sessions = queue_new();
+
+ queue_push_tail(sessions, rap);
+
+ if (!client)
+ return true;
+
+ if (rap->client)
+ return false;
+
+ rap->client = bt_gatt_client_clone(client);
+ if (!rap->client)
+ return false;
+
+ bt_gatt_client_idle_register(rap->client, rap_idle, rap, NULL);
+
+ bt_uuid16_create(&uuid, RAS_UUID16);
+
+ gatt_db_foreach_service(rap->lrapdb->db, &uuid,
+ foreach_rap_service, rap);
+
+ return true;
+}
diff --git a/src/shared/rap.h b/src/shared/rap.h
new file mode 100644
index 000000000..488172ac6
--- /dev/null
+++ b/src/shared/rap.h
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/*
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "src/shared/io.h"
+#include "src/shared/gatt-client.h"
+#include "src/shared/gatt-server.h"
+
+
+struct bt_rap;
+
+typedef void (*bt_rap_debug_func_t)(const char *str, void *user_data);
+typedef void (*bt_rap_ready_func_t)(struct bt_rap *rap, void *user_data);
+typedef void (*bt_rap_destroy_func_t)(void *user_data);
+typedef void (*bt_rap_func_t)(struct bt_rap *rap, void *user_data);
+
+struct bt_rap *bt_rap_ref(struct bt_rap *rap);
+void bt_rap_unref(struct bt_rap *rap);
+
+void bt_rap_add_db(struct gatt_db *db);
+
+bool bt_rap_attach(struct bt_rap *rap, struct bt_gatt_client *client);
+void bt_rap_detach(struct bt_rap *rap);
+
+struct bt_att *bt_rap_get_att(struct bt_rap *rap);
+
+bool bt_rap_set_user_data(struct bt_rap *rap, void *user_data);
+
+bool bt_rap_set_debug(struct bt_rap *rap, bt_rap_debug_func_t func,
+ void *user_data, bt_rap_destroy_func_t destroy);
+
+/* session related functions */
+unsigned int bt_rap_register(bt_rap_func_t attached, bt_rap_func_t detached,
+ void *user_data);
+unsigned int bt_rap_ready_register(struct bt_rap *rap,
+ bt_rap_ready_func_t func, void *user_data,
+ bt_rap_destroy_func_t destroy);
+bool bt_rap_ready_unregister(struct bt_rap *rap, unsigned int id);
+
+bool bt_rap_unregister(unsigned int id);
+
+struct bt_rap *bt_rap_new(struct gatt_db *ldb, struct gatt_db *rdb);
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH BlueZ v1 4/5] unit: Add test cases for Ranging Profile (RAP)
2026-01-27 6:47 [PATCH BlueZ v1 0/5] Add Bluetooth Ranging Service (RAS) support Prathibha Madugonde
` (2 preceding siblings ...)
2026-01-27 6:47 ` [PATCH BlueZ v1 3/5] Implement the Bluetooth Ranging Profile GATT server and client support as specified by the Bluetooth SIG: Prathibha Madugonde
@ 2026-01-27 6:47 ` Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 5/5] profiles: Add Ranging Profile (RAP) implementation Prathibha Madugonde
4 siblings, 0 replies; 10+ messages in thread
From: Prathibha Madugonde @ 2026-01-27 6:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
This adds unit test cases for the Ranging Profile (RAP)
implementation, specifically testing the Ranging Service (RAS) server
functionality.
The test suite includes:
- RAS/SR/SGGIT/SER/BV-01-C: Service discovery test
- RAS/SR/SGGIT/CHA/BV-01-C: Characteristic GGIT -RAS Features
- RAS/SR/SGGIT/CHA/BV-02-C: Characteristic GGIT -Real-time Ranging Data
- RAS/SR/SGGIT/CHA/BV-03-C: Characteristic GGIT -On-demand Ranging Data
- RAS/SR/SGGIT/CHA/BV-04-C: Characteristic GGIT -RAS Control Point
These tests verify GATT server behavior for the Ranging Service,
including service discovery, characteristic discovery.
---
Makefile.am | 6 +
unit/test-rap.c | 458 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 464 insertions(+)
create mode 100644 unit/test-rap.c
diff --git a/Makefile.am b/Makefile.am
index cff5cc034..1f73a4fa0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -757,6 +757,12 @@ unit_test_battery_SOURCES = unit/test-battery.c
unit_test_battery_LDADD = src/libshared-glib.la \
lib/libbluetooth-internal.la $(GLIB_LIBS)
+unit_tests += unit/test-rap
+
+unit_test_rap_SOURCES = unit/test-rap.c $(btio_sources)
+unit_test_rap_LDADD = src/libshared-glib.la \
+ lib/libbluetooth-internal.la $(GLIB_LIBS)
+
if MIDI
unit_tests += unit/test-midi
unit_test_midi_CPPFLAGS = $(AM_CPPFLAGS) $(ALSA_CFLAGS) -DMIDI_TEST
diff --git a/unit/test-rap.c b/unit/test-rap.c
new file mode 100644
index 000000000..a0cb14f7e
--- /dev/null
+++ b/unit/test-rap.c
@@ -0,0 +1,458 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/*
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <fcntl.h>
+
+
+#include <glib.h>
+
+#include "bluetooth/bluetooth.h"
+#include "bluetooth/uuid.h"
+#include "src/shared/util.h"
+#include "src/shared/tester.h"
+#include "src/shared/queue.h"
+#include "src/shared/att.h"
+#include "src/shared/gatt-db.h"
+#include "src/shared/gatt-server.h"
+#include "src/shared/gatt-helpers.h"
+#include "src/shared/rap.h"
+
+struct test_data_ras {
+ struct gatt_db *db;
+ struct bt_gatt_server *server;
+ struct bt_gatt_client *client;
+ struct queue *ccc_states;
+ size_t iovcnt;
+ struct iovec *iov;
+ unsigned int ras_id;
+};
+
+struct test_data_rap {
+ struct gatt_db *db;
+ struct bt_rap *rap;
+ struct bt_gatt_client *client;
+ size_t iovcnt;
+ struct iovec *iov;
+};
+
+struct ccc_state {
+ uint16_t handle;
+ uint16_t value;
+};
+
+struct notify {
+ uint16_t handle, ccc_handle;
+ uint8_t *value;
+ uint16_t len;
+ bt_gatt_server_conf_func_t conf;
+ void *user_data;
+};
+
+#define RAP_GATT_CLIENT_MTU 64
+
+#define iov_data(args...) ((const struct iovec[]) { args })
+
+#define define_test_ras(name, function, args...) \
+ do { \
+ const struct iovec iov[] = { args }; \
+ static struct test_data_ras data; \
+ data.iovcnt = ARRAY_SIZE(iov_data(args)); \
+ data.iov = util_iov_dup(iov, ARRAY_SIZE(iov_data(args))); \
+ tester_add(name, &data, NULL, function, \
+ test_teardown_ras); \
+ } while (0)
+
+static void print_debug(const char *str, void *user_data)
+{
+ const char *prefix = user_data;
+
+ if (tester_use_debug())
+ tester_debug("%s%s", prefix, str);
+}
+
+static void test_teardown_ras(const void *user_data)
+{
+ struct test_data_ras *data = (void *)user_data;
+
+ bt_gatt_server_unref(data->server);
+ util_iov_free(data->iov, data->iovcnt);
+ gatt_db_unref(data->db);
+ bt_rap_unregister(data->ras_id);
+
+ queue_destroy(data->ccc_states, free);
+
+ tester_teardown_complete();
+}
+
+static void test_teardown_rap(const void *user_data)
+{
+ struct test_data_rap *data = (void *)user_data;
+
+ bt_rap_unref(data->rap);
+ bt_gatt_client_unref(data->client);
+ util_iov_free(data->iov, data->iovcnt);
+ gatt_db_unref(data->db);
+
+ tester_teardown_complete();
+}
+
+static void test_complete_cb(const void *user_data)
+{
+ tester_test_passed();
+}
+
+static bool ccc_state_match(const void *a, const void *b)
+{
+ const struct ccc_state *ccc = a;
+ uint16_t handle = PTR_TO_UINT(b);
+
+ return ccc->handle == handle;
+}
+
+static struct ccc_state *find_ccc_state(struct test_data_ras *data,
+ uint16_t handle)
+{
+ return queue_find(data->ccc_states, ccc_state_match,
+ UINT_TO_PTR(handle));
+}
+
+static struct ccc_state *get_ccc_state(struct test_data_ras *data,
+ uint16_t handle)
+{
+ struct ccc_state *ccc;
+
+ ccc = find_ccc_state(data, handle);
+ if (ccc)
+ return ccc;
+
+ ccc = new0(struct ccc_state, 1);
+ ccc->handle = handle;
+ queue_push_tail(data->ccc_states, ccc);
+
+ return ccc;
+}
+
+static void gatt_notify_cb(struct gatt_db_attribute *attrib,
+ struct gatt_db_attribute *ccc,
+ const uint8_t *value, size_t len,
+ struct bt_att *att, void *user_data)
+{
+ struct test_data_ras *data = user_data;
+ struct notify notify;
+
+ memset(¬ify, 0, sizeof(notify));
+
+ notify.handle = gatt_db_attribute_get_handle(attrib);
+ notify.ccc_handle = gatt_db_attribute_get_handle(ccc);
+ notify.value = (void *) value;
+ notify.len = len;
+
+ printf("%s: notify.value:%d notify->len:%d\n", __func__,
+ (int)*(notify.value), notify.len);
+ if (!bt_gatt_server_send_notification(data->server,
+ notify.handle, notify.value,
+ notify.len, false))
+ printf("%s: Failed to send notification\n", __func__);
+}
+
+static void gatt_ccc_read_cb(struct gatt_db_attribute *attrib,
+ unsigned int id, uint16_t offset,
+ uint8_t opcode, struct bt_att *att,
+ void *user_data)
+{
+ struct test_data_ras *data = user_data;
+ struct ccc_state *ccc;
+ uint16_t handle;
+ uint8_t ecode = 0;
+ const uint8_t *value = NULL;
+ size_t len = 0;
+
+ handle = gatt_db_attribute_get_handle(attrib);
+
+ ccc = get_ccc_state(data, handle);
+ if (!ccc) {
+ ecode = BT_ATT_ERROR_UNLIKELY;
+ goto done;
+ }
+
+ len = sizeof(ccc->value);
+ value = (void *) &ccc->value;
+
+done:
+ gatt_db_attribute_read_result(attrib, id, ecode, value, len);
+}
+
+static void ras_attached(struct bt_rap *rap, void *user_data)
+{
+}
+
+static void ras_detached(struct bt_rap *rap, void *user_data)
+{
+ bt_rap_unref(rap);
+}
+
+static void test_server(const void *user_data)
+{
+ struct test_data_ras *data = (void *)user_data;
+ struct bt_att *att;
+ struct io *io;
+
+ io = tester_setup_io(data->iov, data->iovcnt);
+ g_assert(io);
+
+ tester_io_set_complete_func(test_complete_cb);
+
+ att = bt_att_new(io_get_fd(io), false);
+ g_assert(att);
+
+ bt_att_set_debug(att, BT_ATT_DEBUG, print_debug, "bt_att:", NULL);
+
+ data->db = gatt_db_new();
+ g_assert(data->db);
+
+ gatt_db_ccc_register(data->db, gatt_ccc_read_cb, NULL,
+ gatt_notify_cb, data);
+
+ bt_rap_add_db(data->db);
+
+ data->ras_id = bt_rap_register(ras_attached, ras_detached, NULL);
+
+ data->server = bt_gatt_server_new(data->db, att, 64, 0);
+ g_assert(data->server);
+
+ bt_gatt_server_set_debug(data->server, print_debug, "bt_gatt_server:",
+ NULL);
+
+ data->ccc_states = queue_new();
+
+ tester_io_send();
+
+ bt_att_unref(att);
+}
+
+/*
+ * ATT: Exchange MTU Request (0x02) len 2
+ * Client RX MTU: 64
+ *
+ * ATT: Exchange MTU Response (0x03) len 2
+ * Server RX MTU: 64
+ */
+#define ATT_EXCHANGE_MTU IOV_DATA(0x02, 0x40, 0x00), \
+ IOV_DATA(0x03, 0x40, 0x00)
+
+/*
+ * ATT: Read By Group Type Request (0x10) len 6
+ * Handle range: 0x0001-0xffff
+ * Attribute group type: Primary Service (0x2800)
+ *
+ * ATT: Read By Group Type Response (0x11) len 7
+ * Attribute data length: 6
+ * Attribute group list: 1 entry
+ * Handle range: 0x0001-0x0012
+ * UUID: Ranging Service (0x185b)
+ *
+ * ATT: Read By Group Type Request (0x10) len 6
+ * Handle range: 0x0013-0xffff
+ * Attribute group type: Primary Service (0x2800)
+ *
+ * ATT: Error Response (0x01) len 4
+ * Read By Group Type Request (0x10)
+ * Handle: 0x0013
+ * Error: Attribute Not Found (0x0a)
+ */
+#define DISCOVER_PRIM_SERV_NOTIF \
+ IOV_DATA(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28), \
+ IOV_DATA(0x11, 0x06, 0x01, 0x00, 0x12, 0x00, 0x5b, 0x18), \
+ IOV_DATA(0x10, 0x13, 0x00, 0xff, 0xff, 0x00, 0x28), \
+ IOV_DATA(0x01, 0x10, 0x13, 0x00, 0x0a)
+
+/*
+ * ATT: Find By Type Value Request (0x06) len 8
+ * Handle range: 0x0001-0xffff
+ * Attribute type: Primary Service (0x2800)
+ * UUID: Ranging Service (0x185b)
+ *
+ * ATT: Find By Type Value Response (0x07) len 4
+ * Handle range: 0x0001-0x0012
+ *
+ * ATT: Find By Type Value Request (0x06) len 8
+ * Handle range: 0x0013-0xffff
+ * Attribute type: Primary Service (0x2800)
+ * UUID: Ranging Service (0x185b)
+ *
+ * ATT: Error Response (0x01) len 4
+ * Find By Type Value Request (0x06)
+ * Handle: 0x0013
+ * Error: Attribute Not Found (0x0a)
+ */
+#define RAS_FIND_BY_TYPE_VALUE \
+ IOV_DATA(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x5b, 0x18), \
+ IOV_DATA(0x07, 0x01, 0x00, 0x12, 0x00), \
+ IOV_DATA(0x06, 0x13, 0x00, 0xff, 0xff, 0x00, 0x28, 0x5b, 0x18), \
+ IOV_DATA(0x01, 0x06, 0x13, 0x00, 0x0a)
+
+/*
+ * ATT: Read By Type Request (0x08) len 6
+ * Handle range: 0x0001-0x0012
+ * Attribute type: Characteristic (0x2803)
+ *
+ * ATT: Read By Type Response (0x09) len 44
+ * Attribute data length: 7
+ * Attribute data list: 6 entries
+ * Handle: 0x0002 - RAS Features
+ * Value: 020003142c
+ * Handle: 0x0004 - Real-time Ranging Data
+ * Value: 300005152c
+ * Handle: 0x0007 - On-demand Ranging Data
+ * Value: 300008162c
+ * Handle: 0x000a - RAS Control Point
+ * Value: 24000b172c
+ * Handle: 0x000d - RAS Data Ready
+ * Value: 32000e182c
+ * Handle: 0x0010 - RAS Data Overwritten
+ * Value: 320011192c
+ *
+ * ATT: Read By Type Request (0x08) len 6
+ * Handle range: 0x0011-0x0012
+ * Attribute type: Characteristic (0x2803)
+ *
+ * ATT: Error Response (0x01) len 4
+ * Read By Type Request (0x08)
+ * Handle: 0x0011
+ * Error: Attribute Not Found (0x0a)
+ */
+#define DISC_RAS_CHAR_AFTER_TYPE \
+ IOV_DATA(0x08, 0x01, 0x00, 0x12, 0x00, 0x03, 0x28), \
+ IOV_DATA(0x09, 0x07, \
+ 0x02, 0x00, 0x02, 0x03, 0x00, 0x14, 0x2c, \
+ 0x04, 0x00, 0x30, 0x05, 0x00, 0x15, 0x2c, \
+ 0x07, 0x00, 0x30, 0x08, 0x00, 0x16, 0x2c, \
+ 0x0a, 0x00, 0x24, 0x0b, 0x00, 0x17, 0x2c, \
+ 0x0d, 0x00, 0x32, 0x0e, 0x00, 0x18, 0x2c, \
+ 0x10, 0x00, 0x32, 0x11, 0x00, 0x19, 0x2c), \
+ IOV_DATA(0x08, 0x11, 0x00, 0x12, 0x00, 0x03, 0x28), \
+ IOV_DATA(0x01, 0x08, 0x11, 0x00, 0x0a)
+
+/*
+ * ATT: Find Information Request (0x04) len 4
+ * Handle range: 0x0006-0x0012
+ *
+ * ATT: Find Information Response (0x05) len 53
+ * Format: UUID-16 (0x01)
+ * Handle: 0x0006
+ * UUID: Client Characteristic Configuration (0x2902)
+ * Handle: 0x0007
+ * UUID: Characteristic (0x2803)
+ * Handle: 0x0008
+ * UUID: On-demand Ranging Data (0x2c16)
+ * Handle: 0x0009
+ * UUID: Client Characteristic Configuration (0x2902)
+ * Handle: 0x000a
+ * UUID: Characteristic (0x2803)
+ * Handle: 0x000b
+ * UUID: RAS Control Point (0x2c17)
+ * Handle: 0x000c
+ * UUID: Client Characteristic Configuration (0x2902)
+ * Handle: 0x000d
+ * UUID: Characteristic (0x2803)
+ * Handle: 0x000e
+ * UUID: RAS Data Ready (0x2c18)
+ * Handle: 0x000f
+ * UUID: Client Characteristic Configuration (0x2902)
+ * Handle: 0x0010
+ * UUID: Characteristic (0x2803)
+ * Handle: 0x0011
+ * UUID: RAS Data Overwritten (0x2c19)
+ * Handle: 0x0012
+ * UUID: Client Characteristic Configuration (0x2902)
+ *
+ * ATT: Find Information Request (0x04) len 4
+ * Handle range: 0x0013-0x0013
+ *
+ * ATT: Error Response (0x01) len 4
+ * Find Information Request (0x04)
+ * Handle: 0x0013
+ * Error: Attribute Not Found (0x0a)
+ */
+#define RAS_FIND_INFO \
+ IOV_DATA(0x04, 0x06, 0x00, 0x12, 0x00), \
+ IOV_DATA(0x05, 0x01, \
+ 0x06, 0x00, 0x02, 0x29, \
+ 0x07, 0x00, 0x03, 0x28, \
+ 0x08, 0x00, 0x16, 0x2c, \
+ 0x09, 0x00, 0x02, 0x29, \
+ 0x0a, 0x00, 0x03, 0x28, \
+ 0x0b, 0x00, 0x17, 0x2c, \
+ 0x0c, 0x00, 0x02, 0x29, \
+ 0x0d, 0x00, 0x03, 0x28, \
+ 0x0e, 0x00, 0x18, 0x2c, \
+ 0x0f, 0x00, 0x02, 0x29, \
+ 0x10, 0x00, 0x03, 0x28, \
+ 0x11, 0x00, 0x19, 0x2c, \
+ 0x12, 0x00, 0x02, 0x29), \
+ IOV_DATA(0x04, 0x13, 0x00, 0x13, 0x00), \
+ IOV_DATA(0x01, 0x04, 0x13, 0x00, 0x0a)
+
+
+#define RAS_SR_SGGIT_SER_BV_01_C \
+ ATT_EXCHANGE_MTU, \
+ DISCOVER_PRIM_SERV_NOTIF, \
+ RAS_FIND_BY_TYPE_VALUE
+
+#define RAS_SR_SGGIT_CHA_BV_01_C \
+ ATT_EXCHANGE_MTU, \
+ DISCOVER_PRIM_SERV_NOTIF, \
+ RAS_FIND_BY_TYPE_VALUE, \
+ DISC_RAS_CHAR_AFTER_TYPE
+
+#define RAS_SR_SGGIT_CHA_BV_02_C \
+ ATT_EXCHANGE_MTU, \
+ DISCOVER_PRIM_SERV_NOTIF, \
+ RAS_FIND_BY_TYPE_VALUE, \
+ DISC_RAS_CHAR_AFTER_TYPE, \
+ RAS_FIND_INFO
+
+#define RAS_SR_SGGIT_CHA_BV_03_C \
+ ATT_EXCHANGE_MTU, \
+ DISCOVER_PRIM_SERV_NOTIF, \
+ RAS_FIND_BY_TYPE_VALUE, \
+ DISC_RAS_CHAR_AFTER_TYPE, \
+ RAS_FIND_INFO
+
+#define RAS_SR_SGGIT_CHA_BV_04_C \
+ ATT_EXCHANGE_MTU, \
+ DISCOVER_PRIM_SERV_NOTIF, \
+ RAS_FIND_BY_TYPE_VALUE, \
+ DISC_RAS_CHAR_AFTER_TYPE, \
+ RAS_FIND_INFO
+
+int main(int argc, char *argv[])
+{
+ tester_init(&argc, &argv);
+
+ /* RAS Testcases */
+ define_test_ras("RAS/SR/SGGIT/SER/BV-01-C", test_server,
+ RAS_SR_SGGIT_SER_BV_01_C);
+ define_test_ras("RAS/SR/SGGIT/CHA/BV-01-C", test_server,
+ RAS_SR_SGGIT_CHA_BV_01_C);
+ define_test_ras("RAS/SR/SGGIT/CHA/BV-02-C", test_server,
+ RAS_SR_SGGIT_CHA_BV_02_C);
+ define_test_ras("RAS/SR/SGGIT/CHA/BV-03-C", test_server,
+ RAS_SR_SGGIT_CHA_BV_03_C);
+ define_test_ras("RAS/SR/SGGIT/CHA/BV-04-C", test_server,
+ RAS_SR_SGGIT_CHA_BV_04_C);
+
+ return tester_run();
+}
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH BlueZ v1 5/5] profiles: Add Ranging Profile (RAP) implementation.
2026-01-27 6:47 [PATCH BlueZ v1 0/5] Add Bluetooth Ranging Service (RAS) support Prathibha Madugonde
` (3 preceding siblings ...)
2026-01-27 6:47 ` [PATCH BlueZ v1 4/5] unit: Add test cases for Ranging Profile (RAP) Prathibha Madugonde
@ 2026-01-27 6:47 ` Prathibha Madugonde
4 siblings, 0 replies; 10+ messages in thread
From: Prathibha Madugonde @ 2026-01-27 6:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
The profile is marked as experimental and requires D-Bus
experimental flag to be enabled.
---
Makefile.plugins | 3 +
profiles/ranging/rap.c | 333 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 336 insertions(+)
create mode 100644 profiles/ranging/rap.c
diff --git a/Makefile.plugins b/Makefile.plugins
index 654936176..b83a28257 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
@@ -106,6 +106,9 @@ endif
builtin_modules += battery
builtin_sources += profiles/battery/battery.c
+builtin_modules += rap
+builtin_sources += profiles/ranging/rap.c
+
if SIXAXIS
builtin_modules += sixaxis
builtin_sources += plugins/sixaxis.c
diff --git a/profiles/ranging/rap.c b/profiles/ranging/rap.c
new file mode 100644
index 000000000..f03454c72
--- /dev/null
+++ b/profiles/ranging/rap.c
@@ -0,0 +1,333 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdbool.h>
+#include <errno.h>
+
+#include <glib.h>
+
+#include "gdbus/gdbus.h"
+
+#include "bluetooth/bluetooth.h"
+#include "bluetooth/uuid.h"
+
+#include "src/plugin.h"
+#include "src/adapter.h"
+#include "src/device.h"
+#include "src/profile.h"
+#include "src/service.h"
+#include "src/gatt-database.h"
+#include "attrib/gattrib.h"
+#include "src/shared/util.h"
+#include "src/shared/queue.h"
+#include "src/shared/att.h"
+#include "src/shared/gatt-db.h"
+#include "src/shared/gatt-client.h"
+#include "src/shared/rap.h"
+#include "attrib/att.h"
+#include "src/log.h"
+
+struct rap_data {
+ struct btd_device *device;
+ struct btd_service *service;
+ struct bt_rap *rap;
+ unsigned int ready_id;
+};
+
+static struct queue *sessions;
+
+static struct rap_data *rap_data_new(struct btd_device *device)
+{
+ struct rap_data *data;
+
+ data = new0(struct rap_data, 1);
+ data->device = device;
+
+ return data;
+}
+
+static void rap_debug(const char *str, void *user_data)
+{
+ DBG_IDX(0xffff, "%s", str);
+}
+
+static void rap_data_add(struct rap_data *data)
+{
+ DBG("%p", data);
+
+ if (queue_find(sessions, NULL, data)) {
+ error("data %p already added", data);
+ return;
+ }
+
+ bt_rap_set_debug(data->rap, rap_debug, NULL, NULL);
+
+ if (!sessions)
+ sessions = queue_new();
+
+ queue_push_tail(sessions, data);
+
+ if (data->service)
+ btd_service_set_user_data(data->service, data);
+}
+
+static bool match_data(const void *data, const void *match_data)
+{
+ const struct rap_data *mdata = data;
+ const struct bt_rap *rap = match_data;
+
+ return mdata->rap == rap;
+}
+
+static void rap_data_free(struct rap_data *data)
+{
+ if (data->service) {
+ btd_service_set_user_data(data->service, NULL);
+ bt_rap_set_user_data(data->rap, NULL);
+ }
+
+ bt_rap_ready_unregister(data->rap, data->ready_id);
+ bt_rap_unref(data->rap);
+ free(data);
+}
+
+static void rap_data_remove(struct rap_data *data)
+{
+ DBG("%p", data);
+
+ if (!queue_remove(sessions, data))
+ return;
+
+ rap_data_free(data);
+
+ if (queue_isempty(sessions)) {
+ queue_destroy(sessions, NULL);
+ sessions = NULL;
+ }
+}
+
+static void rap_detached(struct bt_rap *rap, void *user_data)
+{
+ struct rap_data *data;
+
+ DBG("%p", rap);
+
+ data = queue_find(sessions, match_data, rap);
+ if (!data) {
+ error("unable to find session");
+ return;
+ }
+
+ rap_data_remove(data);
+}
+
+static void rap_ready(struct bt_rap *rap, void *user_data)
+{
+ DBG("%p", rap);
+}
+
+static void rap_attached(struct bt_rap *rap, void *user_data)
+{
+ struct rap_data *data;
+ struct bt_att *att;
+ struct btd_device *device;
+
+ DBG("%p", rap);
+
+ data = queue_find(sessions, match_data, rap);
+ if (data) {
+ DBG("data is already present");
+ return;
+ }
+
+ att = bt_rap_get_att(rap);
+ if (!att) {
+ error("Unable to get att");
+ return;
+ }
+
+ device = btd_adapter_find_device_by_fd(bt_att_get_fd(att));
+ if (!device) {
+ error("unable to find device");
+ return;
+ }
+
+ data = rap_data_new(device);
+ data->rap = rap;
+
+ rap_data_add(data);
+}
+
+static int rap_probe(struct btd_service *service)
+{
+ struct btd_device *device = btd_service_get_device(service);
+ struct btd_adapter *adapter = device_get_adapter(device);
+ struct btd_gatt_database *database = btd_adapter_get_database(adapter);
+ struct rap_data *data = btd_service_get_user_data(service);
+ char addr[18];
+
+ ba2str(device_get_address(device), addr);
+ DBG("%s", addr);
+
+ /*Ignore, if we probed for this device already */
+ if (data) {
+ error("Profile probed twice for this device");
+ return -EINVAL;
+ }
+
+ data = rap_data_new(device);
+ data->service = service;
+
+ data->rap = bt_rap_new(btd_gatt_database_get_db(database),
+ btd_device_get_gatt_db(device));
+
+ if (!data->rap) {
+ error("unable to create RAP instance");
+ free(data);
+ return -EINVAL;
+ }
+
+ rap_data_add(data);
+
+ data->ready_id = bt_rap_ready_register(data->rap, rap_ready, service,
+ NULL);
+
+ bt_rap_set_user_data(data->rap, service);
+
+ return 0;
+}
+
+static void rap_remove(struct btd_service *service)
+{
+ struct btd_device *device = btd_service_get_device(service);
+ struct rap_data *data;
+ char addr[18];
+
+ ba2str(device_get_address(device), addr);
+ DBG("%s", addr);
+
+ data = btd_service_get_user_data(service);
+ if (!data) {
+ error("RAP Service not handled by profile");
+ return;
+ }
+
+ rap_data_remove(data);
+}
+
+static int rap_accept(struct btd_service *service)
+{
+ struct btd_device *device = btd_service_get_device(service);
+ struct bt_gatt_client *client = btd_device_get_gatt_client(device);
+ struct rap_data *data = btd_service_get_user_data(service);
+ char addr[18];
+
+ ba2str(device_get_address(device), addr);
+ DBG("%s", addr);
+
+ if (!data) {
+ error("RAP Service not handled by profile");
+ return -EINVAL;
+ }
+
+ if (!bt_rap_attach(data->rap, client)) {
+ error("RAP unable to attach");
+ return -EINVAL;
+ }
+
+ btd_service_connecting_complete(service, 0);
+
+ return 0;
+}
+
+static int rap_disconnect(struct btd_service *service)
+{
+ DBG(" ");
+ btd_service_disconnecting_complete(service, 0);
+ return 0;
+}
+
+static int rap_connect(struct btd_service *service)
+{
+ struct btd_device *device = btd_service_get_device(service);
+ char addr[18];
+
+ ba2str(device_get_address(device), addr);
+ DBG("%s", addr);
+
+ return 0;
+}
+
+static int rap_server_probe(struct btd_profile *p,
+ struct btd_adapter *adapter)
+{
+
+ struct btd_gatt_database *database = btd_adapter_get_database(adapter);
+
+ DBG("RAP path %s", adapter_get_path(adapter));
+
+ bt_rap_add_db(btd_gatt_database_get_db(database));
+
+ return 0;
+}
+
+static void rap_server_remove(struct btd_profile *p,
+ struct btd_adapter *adapter)
+{
+ DBG("");
+}
+/* Profile definition */
+static struct btd_profile rap_profile = {
+ .name = "rap",
+ .priority = BTD_PROFILE_PRIORITY_MEDIUM,
+ .remote_uuid = GATT_UUID,
+ .local_uuid = RAS_UUID,
+
+ .device_probe = rap_probe,
+ .device_remove = rap_remove,
+
+ .accept = rap_accept,
+ .connect = rap_connect,
+ .disconnect = rap_disconnect,
+
+ .adapter_probe = rap_server_probe,
+ .adapter_remove = rap_server_remove,
+
+ .experimental = true,
+};
+
+static unsigned int rap_id;
+/* Plugin init/exit */
+static int rap_init(void)
+{
+ DBG("");
+ if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
+ DBG("D-Bus experimental not enabled");
+ return -ENOTSUP;
+ }
+
+ btd_profile_register(&rap_profile);
+ rap_id = bt_rap_register(rap_attached, rap_detached, NULL);
+
+ return 0;
+}
+
+static void rap_exit(void)
+{
+ if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
+ btd_profile_unregister(&rap_profile);
+ bt_rap_unregister(rap_id);
+ }
+}
+
+/* Plugin definition */
+BLUETOOTH_PLUGIN_DEFINE(rap, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+ rap_init, rap_exit)
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: Add Bluetooth Ranging Service (RAS) support
2026-01-27 6:47 ` [PATCH BlueZ v1 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
@ 2026-01-27 7:04 ` bluez.test.bot
0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2026-01-27 7:04 UTC (permalink / raw)
To: linux-bluetooth, prathibha.madugonde
[-- Attachment #1: Type: text/plain, Size: 158408 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1047390
---Test result---
Test Summary:
CheckPatch PENDING 0.29 seconds
GitLint PENDING 0.29 seconds
BuildEll PASS 20.24 seconds
BluezMake FAIL 19.06 seconds
MakeCheck FAIL 42.18 seconds
MakeDistcheck PASS 244.93 seconds
CheckValgrind FAIL 15.63 seconds
CheckSmatch FAIL 21.88 seconds
bluezmakeextell FAIL 13.66 seconds
IncrementalBuild PENDING 0.28 seconds
ScanBuild FAIL 33.88 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: BluezMake - FAIL
Desc: Build BlueZ
Output:
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:19:24: error: redundant redeclaration of ‘bt_gatt_client_new’ [-Werror=redundant-decls]
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:19:24: note: previous declaration of ‘bt_gatt_client_new’ was here
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:23:24: error: redundant redeclaration of ‘bt_gatt_client_clone’ [-Werror=redundant-decls]
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:23:24: note: previous declaration of ‘bt_gatt_client_clone’ was here
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:25:24: error: redundant redeclaration of ‘bt_gatt_client_ref’ [-Werror=redundant-decls]
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:25:24: note: previous declaration of ‘bt_gatt_client_ref’ was here
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:26:6: error: redundant redeclaration of ‘bt_gatt_client_unref’ [-Werror=redundant-decls]
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:26:6: note: previous declaration of ‘bt_gatt_client_unref’ was here
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:48:6: error: redundant redeclaration of ‘bt_gatt_client_is_ready’ [-Werror=redundant-decls]
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:48:6: note: previous declaration of ‘bt_gatt_client_is_ready’ was here
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:49:14: error: redundant redeclaration of ‘bt_gatt_client_ready_register’ [-Werror=redundant-decls]
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:49:14: note: previous declaration of ‘bt_gatt_client_ready_register’ was here
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:53:6: error: redundant redeclaration of ‘bt_gatt_client_ready_unregister’ [-Werror=redundant-decls]
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:53:6: note: previous declaration of ‘bt_gatt_client_ready_unregister’ was here
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:55:6: error: redundant redeclaration of ‘bt_gatt_client_set_service_changed’ [-Werror=redundant-decls]
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:55:6: note: previous declaration of ‘bt_gatt_client_set_service_changed’ was here
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:59:6: error: redundant redeclaration of ‘bt_gatt_client_set_debug’ [-Werror=redundant-decls]
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:59:6: note: previous declaration of ‘bt_gatt_client_set_debug’ was here
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:64:10: error: redundant redeclaration of ‘bt_gatt_client_get_mtu’ [-Werror=redundant-decls]
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:64:10: note: previous declaration of ‘bt_gatt_client_get_mtu’ was here
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:65:16: error: redundant redeclaration of ‘bt_gatt_client_get_att’ [-Werror=redundant-decls]
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:65:16: note: previous declaration of ‘bt_gatt_client_get_att’ was here
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:66:17: error: redundant redeclaration of ‘bt_gatt_client_get_db’ [-Werror=redundant-decls]
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:66:17: note: previous declaration of ‘bt_gatt_client_get_db’ was here
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:67:9: error: redundant redeclaration of ‘bt_gatt_client_get_features’ [-Werror=redundant-decls]
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:67:9: note: previous declaration of ‘bt_gatt_client_get_features’ was here
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:69:6: error: redundant redeclaration of ‘bt_gatt_client_cancel’ [-Werror=redundant-decls]
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:69:6: note: previous declaration of ‘bt_gatt_client_cancel’ was here
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:70:6: error: redundant redeclaration of ‘bt_gatt_client_cancel_all’ [-Werror=redundant-decls]
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:70:6: note: previous declaration of ‘bt_gatt_client_cancel_all’ was here
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:72:14: error: redundant redeclaration of ‘bt_gatt_client_read_value’ [-Werror=redundant-decls]
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:72:14: note: previous declaration of ‘bt_gatt_client_read_value’ was here
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:77:14: error: redundant redeclaration of ‘bt_gatt_client_read_long_value’ [-Werror=redundant-decls]
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:77:14: note: previous declaration of ‘bt_gatt_client_read_long_value’ was here
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:82:14: error: redundant redeclaration of ‘bt_gatt_client_read_multiple’ [-Werror=redundant-decls]
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:82:14: note: previous declaration of ‘bt_gatt_client_read_multiple’ was here
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:88:14: error: redundant redeclaration of ‘bt_gatt_client_write_without_response’ [-Werror=redundant-decls]
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:88:14: note: previous declaration of ‘bt_gatt_client_write_without_response’ was here
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:93:14: error: redundant redeclaration of ‘bt_gatt_client_write_value’ [-Werror=redundant-decls]
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:93:14: note: previous declaration of ‘bt_gatt_client_write_value’ was here
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:99:14: error: redundant redeclaration of ‘bt_gatt_client_write_long_value’ [-Werror=redundant-decls]
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:99:14: note: previous declaration of ‘bt_gatt_client_write_long_value’ was here
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:106:14: error: redundant redeclaration of ‘bt_gatt_client_prepare_write’ [-Werror=redundant-decls]
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:106:14: note: previous declaration of ‘bt_gatt_client_prepare_write’ was here
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:113:14: error: redundant redeclaration of ‘bt_gatt_client_write_execute’ [-Werror=redundant-decls]
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:113:14: note: previous declaration of ‘bt_gatt_client_write_execute’ was here
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:119:14: error: redundant redeclaration of ‘bt_gatt_client_register_notify’ [-Werror=redundant-decls]
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:119:14: note: previous declaration of ‘bt_gatt_client_register_notify’ was here
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:125:6: error: redundant redeclaration of ‘bt_gatt_client_unregister_notify’ [-Werror=redundant-decls]
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:125:6: note: previous declaration of ‘bt_gatt_client_unregister_notify’ was here
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:128:6: error: redundant redeclaration of ‘bt_gatt_client_set_security’ [-Werror=redundant-decls]
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:128:6: note: previous declaration of ‘bt_gatt_client_set_security’ was here
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:129:5: error: redundant redeclaration of ‘bt_gatt_client_get_security’ [-Werror=redundant-decls]
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:129:5: note: previous declaration of ‘bt_gatt_client_get_security’ was here
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:131:14: error: redundant redeclaration of ‘bt_gatt_client_idle_register’ [-Werror=redundant-decls]
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:131:14: note: previous declaration of ‘bt_gatt_client_idle_register’ was here
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:135:6: error: redundant redeclaration of ‘bt_gatt_client_idle_unregister’ [-Werror=redundant-decls]
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:135:6: note: previous declaration of ‘bt_gatt_client_idle_unregister’ was here
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:137:6: error: redundant redeclaration of ‘bt_gatt_client_set_retry’ [-Werror=redundant-decls]
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:137:6: note: previous declaration of ‘bt_gatt_client_set_retry’ was here
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:15:24: error: redundant redeclaration of ‘bt_gatt_server_new’ [-Werror=redundant-decls]
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:15:24: note: previous declaration of ‘bt_gatt_server_new’ was here
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:18:10: error: redundant redeclaration of ‘bt_gatt_server_get_mtu’ [-Werror=redundant-decls]
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:18:10: note: previous declaration of ‘bt_gatt_server_get_mtu’ was here
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:19:16: error: redundant redeclaration of ‘bt_gatt_server_get_att’ [-Werror=redundant-decls]
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:19:16: note: previous declaration of ‘bt_gatt_server_get_att’ was here
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:21:24: error: redundant redeclaration of ‘bt_gatt_server_ref’ [-Werror=redundant-decls]
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:21:24: note: previous declaration of ‘bt_gatt_server_ref’ was here
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:22:6: error: redundant redeclaration of ‘bt_gatt_server_unref’ [-Werror=redundant-decls]
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:22:6: note: previous declaration of ‘bt_gatt_server_unref’ was here
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:28:6: error: redundant redeclaration of ‘bt_gatt_server_set_debug’ [-Werror=redundant-decls]
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:28:6: note: previous declaration of ‘bt_gatt_server_set_debug’ was here
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:36:6: error: redundant redeclaration of ‘bt_gatt_server_set_authorize’ [-Werror=redundant-decls]
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:36:6: note: previous declaration of ‘bt_gatt_server_set_authorize’ was here
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:40:6: error: redundant redeclaration of ‘bt_gatt_server_send_notification’ [-Werror=redundant-decls]
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:40:6: note: previous declaration of ‘bt_gatt_server_send_notification’ was here
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:44:6: error: redundant redeclaration of ‘bt_gatt_server_send_indication’ [-Werror=redundant-decls]
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:44:6: note: previous declaration of ‘bt_gatt_server_send_indication’ was here
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:19:24: error: redundant redeclaration of ‘bt_gatt_client_new’ [-Werror=redundant-decls]
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:19:24: note: previous declaration of ‘bt_gatt_client_new’ was here
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:23:24: error: redundant redeclaration of ‘bt_gatt_client_clone’ [-Werror=redundant-decls]
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:23:24: note: previous declaration of ‘bt_gatt_client_clone’ was here
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:25:24: error: redundant redeclaration of ‘bt_gatt_client_ref’ [-Werror=redundant-decls]
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:25:24: note: previous declaration of ‘bt_gatt_client_ref’ was here
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:26:6: error: redundant redeclaration of ‘bt_gatt_client_unref’ [-Werror=redundant-decls]
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:26:6: note: previous declaration of ‘bt_gatt_client_unref’ was here
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:48:6: error: redundant redeclaration of ‘bt_gatt_client_is_ready’ [-Werror=redundant-decls]
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:48:6: note: previous declaration of ‘bt_gatt_client_is_ready’ was here
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:49:14: error: redundant redeclaration of ‘bt_gatt_client_ready_register’ [-Werror=redundant-decls]
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:49:14: note: previous declaration of ‘bt_gatt_client_ready_register’ was here
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:53:6: error: redundant redeclaration of ‘bt_gatt_client_ready_unregister’ [-Werror=redundant-decls]
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:53:6: note: previous declaration of ‘bt_gatt_client_ready_unregister’ was here
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:55:6: error: redundant redeclaration of ‘bt_gatt_client_set_service_changed’ [-Werror=redundant-decls]
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:55:6: note: previous declaration of ‘bt_gatt_client_set_service_changed’ was here
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:59:6: error: redundant redeclaration of ‘bt_gatt_client_set_debug’ [-Werror=redundant-decls]
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:59:6: note: previous declaration of ‘bt_gatt_client_set_debug’ was here
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:64:10: error: redundant redeclaration of ‘bt_gatt_client_get_mtu’ [-Werror=redundant-decls]
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:64:10: note: previous declaration of ‘bt_gatt_client_get_mtu’ was here
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:65:16: error: redundant redeclaration of ‘bt_gatt_client_get_att’ [-Werror=redundant-decls]
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:65:16: note: previous declaration of ‘bt_gatt_client_get_att’ was here
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:66:17: error: redundant redeclaration of ‘bt_gatt_client_get_db’ [-Werror=redundant-decls]
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:66:17: note: previous declaration of ‘bt_gatt_client_get_db’ was here
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:67:9: error: redundant redeclaration of ‘bt_gatt_client_get_features’ [-Werror=redundant-decls]
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:67:9: note: previous declaration of ‘bt_gatt_client_get_features’ was here
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:69:6: error: redundant redeclaration of ‘bt_gatt_client_cancel’ [-Werror=redundant-decls]
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:69:6: note: previous declaration of ‘bt_gatt_client_cancel’ was here
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:70:6: error: redundant redeclaration of ‘bt_gatt_client_cancel_all’ [-Werror=redundant-decls]
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:70:6: note: previous declaration of ‘bt_gatt_client_cancel_all’ was here
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:72:14: error: redundant redeclaration of ‘bt_gatt_client_read_value’ [-Werror=redundant-decls]
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:72:14: note: previous declaration of ‘bt_gatt_client_read_value’ was here
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:77:14: error: redundant redeclaration of ‘bt_gatt_client_read_long_value’ [-Werror=redundant-decls]
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:77:14: note: previous declaration of ‘bt_gatt_client_read_long_value’ was here
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:82:14: error: redundant redeclaration of ‘bt_gatt_client_read_multiple’ [-Werror=redundant-decls]
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:82:14: note: previous declaration of ‘bt_gatt_client_read_multiple’ was here
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:88:14: error: redundant redeclaration of ‘bt_gatt_client_write_without_response’ [-Werror=redundant-decls]
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:88:14: note: previous declaration of ‘bt_gatt_client_write_without_response’ was here
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:93:14: error: redundant redeclaration of ‘bt_gatt_client_write_value’ [-Werror=redundant-decls]
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:93:14: note: previous declaration of ‘bt_gatt_client_write_value’ was here
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:99:14: error: redundant redeclaration of ‘bt_gatt_client_write_long_value’ [-Werror=redundant-decls]
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:99:14: note: previous declaration of ‘bt_gatt_client_write_long_value’ was here
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:106:14: error: redundant redeclaration of ‘bt_gatt_client_prepare_write’ [-Werror=redundant-decls]
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:106:14: note: previous declaration of ‘bt_gatt_client_prepare_write’ was here
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:113:14: error: redundant redeclaration of ‘bt_gatt_client_write_execute’ [-Werror=redundant-decls]
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:113:14: note: previous declaration of ‘bt_gatt_client_write_execute’ was here
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:119:14: error: redundant redeclaration of ‘bt_gatt_client_register_notify’ [-Werror=redundant-decls]
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:119:14: note: previous declaration of ‘bt_gatt_client_register_notify’ was here
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:125:6: error: redundant redeclaration of ‘bt_gatt_client_unregister_notify’ [-Werror=redundant-decls]
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:125:6: note: previous declaration of ‘bt_gatt_client_unregister_notify’ was here
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:128:6: error: redundant redeclaration of ‘bt_gatt_client_set_security’ [-Werror=redundant-decls]
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:128:6: note: previous declaration of ‘bt_gatt_client_set_security’ was here
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:129:5: error: redundant redeclaration of ‘bt_gatt_client_get_security’ [-Werror=redundant-decls]
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:129:5: note: previous declaration of ‘bt_gatt_client_get_security’ was here
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:131:14: error: redundant redeclaration of ‘bt_gatt_client_idle_register’ [-Werror=redundant-decls]
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:131:14: note: previous declaration of ‘bt_gatt_client_idle_register’ was here
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:135:6: error: redundant redeclaration of ‘bt_gatt_client_idle_unregister’ [-Werror=redundant-decls]
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:135:6: note: previous declaration of ‘bt_gatt_client_idle_unregister’ was here
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:137:6: error: redundant redeclaration of ‘bt_gatt_client_set_retry’ [-Werror=redundant-decls]
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:137:6: note: previous declaration of ‘bt_gatt_client_set_retry’ was here
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:15:24: error: redundant redeclaration of ‘bt_gatt_server_new’ [-Werror=redundant-decls]
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:15:24: note: previous declaration of ‘bt_gatt_server_new’ was here
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:18:10: error: redundant redeclaration of ‘bt_gatt_server_get_mtu’ [-Werror=redundant-decls]
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:18:10: note: previous declaration of ‘bt_gatt_server_get_mtu’ was here
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:19:16: error: redundant redeclaration of ‘bt_gatt_server_get_att’ [-Werror=redundant-decls]
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:19:16: note: previous declaration of ‘bt_gatt_server_get_att’ was here
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:21:24: error: redundant redeclaration of ‘bt_gatt_server_ref’ [-Werror=redundant-decls]
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:21:24: note: previous declaration of ‘bt_gatt_server_ref’ was here
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:22:6: error: redundant redeclaration of ‘bt_gatt_server_unref’ [-Werror=redundant-decls]
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:22:6: note: previous declaration of ‘bt_gatt_server_unref’ was here
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:28:6: error: redundant redeclaration of ‘bt_gatt_server_set_debug’ [-Werror=redundant-decls]
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:28:6: note: previous declaration of ‘bt_gatt_server_set_debug’ was here
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:36:6: error: redundant redeclaration of ‘bt_gatt_server_set_authorize’ [-Werror=redundant-decls]
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:36:6: note: previous declaration of ‘bt_gatt_server_set_authorize’ was here
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:40:6: error: redundant redeclaration of ‘bt_gatt_server_send_notification’ [-Werror=redundant-decls]
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:40:6: note: previous declaration of ‘bt_gatt_server_send_notification’ was here
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:44:6: error: redundant redeclaration of ‘bt_gatt_server_send_indication’ [-Werror=redundant-decls]
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:44:6: note: previous declaration of ‘bt_gatt_server_send_indication’ was here
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7789: src/shared/libshared_glib_la-rap.lo] Error 1
make: *** [Makefile:11120: check] Error 2
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:19:24: error: redundant redeclaration of ‘bt_gatt_client_new’ [-Werror=redundant-decls]
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:19:24: note: previous declaration of ‘bt_gatt_client_new’ was here
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:23:24: error: redundant redeclaration of ‘bt_gatt_client_clone’ [-Werror=redundant-decls]
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:23:24: note: previous declaration of ‘bt_gatt_client_clone’ was here
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:25:24: error: redundant redeclaration of ‘bt_gatt_client_ref’ [-Werror=redundant-decls]
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:25:24: note: previous declaration of ‘bt_gatt_client_ref’ was here
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:26:6: error: redundant redeclaration of ‘bt_gatt_client_unref’ [-Werror=redundant-decls]
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:26:6: note: previous declaration of ‘bt_gatt_client_unref’ was here
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:48:6: error: redundant redeclaration of ‘bt_gatt_client_is_ready’ [-Werror=redundant-decls]
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:48:6: note: previous declaration of ‘bt_gatt_client_is_ready’ was here
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:49:14: error: redundant redeclaration of ‘bt_gatt_client_ready_register’ [-Werror=redundant-decls]
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:49:14: note: previous declaration of ‘bt_gatt_client_ready_register’ was here
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:53:6: error: redundant redeclaration of ‘bt_gatt_client_ready_unregister’ [-Werror=redundant-decls]
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:53:6: note: previous declaration of ‘bt_gatt_client_ready_unregister’ was here
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:55:6: error: redundant redeclaration of ‘bt_gatt_client_set_service_changed’ [-Werror=redundant-decls]
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:55:6: note: previous declaration of ‘bt_gatt_client_set_service_changed’ was here
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:59:6: error: redundant redeclaration of ‘bt_gatt_client_set_debug’ [-Werror=redundant-decls]
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:59:6: note: previous declaration of ‘bt_gatt_client_set_debug’ was here
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:64:10: error: redundant redeclaration of ‘bt_gatt_client_get_mtu’ [-Werror=redundant-decls]
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:64:10: note: previous declaration of ‘bt_gatt_client_get_mtu’ was here
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:65:16: error: redundant redeclaration of ‘bt_gatt_client_get_att’ [-Werror=redundant-decls]
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:65:16: note: previous declaration of ‘bt_gatt_client_get_att’ was here
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:66:17: error: redundant redeclaration of ‘bt_gatt_client_get_db’ [-Werror=redundant-decls]
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:66:17: note: previous declaration of ‘bt_gatt_client_get_db’ was here
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:67:9: error: redundant redeclaration of ‘bt_gatt_client_get_features’ [-Werror=redundant-decls]
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:67:9: note: previous declaration of ‘bt_gatt_client_get_features’ was here
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:69:6: error: redundant redeclaration of ‘bt_gatt_client_cancel’ [-Werror=redundant-decls]
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:69:6: note: previous declaration of ‘bt_gatt_client_cancel’ was here
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:70:6: error: redundant redeclaration of ‘bt_gatt_client_cancel_all’ [-Werror=redundant-decls]
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:70:6: note: previous declaration of ‘bt_gatt_client_cancel_all’ was here
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:72:14: error: redundant redeclaration of ‘bt_gatt_client_read_value’ [-Werror=redundant-decls]
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:72:14: note: previous declaration of ‘bt_gatt_client_read_value’ was here
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:77:14: error: redundant redeclaration of ‘bt_gatt_client_read_long_value’ [-Werror=redundant-decls]
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:77:14: note: previous declaration of ‘bt_gatt_client_read_long_value’ was here
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:82:14: error: redundant redeclaration of ‘bt_gatt_client_read_multiple’ [-Werror=redundant-decls]
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:82:14: note: previous declaration of ‘bt_gatt_client_read_multiple’ was here
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:88:14: error: redundant redeclaration of ‘bt_gatt_client_write_without_response’ [-Werror=redundant-decls]
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:88:14: note: previous declaration of ‘bt_gatt_client_write_without_response’ was here
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:93:14: error: redundant redeclaration of ‘bt_gatt_client_write_value’ [-Werror=redundant-decls]
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:93:14: note: previous declaration of ‘bt_gatt_client_write_value’ was here
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:99:14: error: redundant redeclaration of ‘bt_gatt_client_write_long_value’ [-Werror=redundant-decls]
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:99:14: note: previous declaration of ‘bt_gatt_client_write_long_value’ was here
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:106:14: error: redundant redeclaration of ‘bt_gatt_client_prepare_write’ [-Werror=redundant-decls]
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:106:14: note: previous declaration of ‘bt_gatt_client_prepare_write’ was here
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:113:14: error: redundant redeclaration of ‘bt_gatt_client_write_execute’ [-Werror=redundant-decls]
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:113:14: note: previous declaration of ‘bt_gatt_client_write_execute’ was here
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:119:14: error: redundant redeclaration of ‘bt_gatt_client_register_notify’ [-Werror=redundant-decls]
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:119:14: note: previous declaration of ‘bt_gatt_client_register_notify’ was here
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:125:6: error: redundant redeclaration of ‘bt_gatt_client_unregister_notify’ [-Werror=redundant-decls]
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:125:6: note: previous declaration of ‘bt_gatt_client_unregister_notify’ was here
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:128:6: error: redundant redeclaration of ‘bt_gatt_client_set_security’ [-Werror=redundant-decls]
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:128:6: note: previous declaration of ‘bt_gatt_client_set_security’ was here
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:129:5: error: redundant redeclaration of ‘bt_gatt_client_get_security’ [-Werror=redundant-decls]
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:129:5: note: previous declaration of ‘bt_gatt_client_get_security’ was here
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:131:14: error: redundant redeclaration of ‘bt_gatt_client_idle_register’ [-Werror=redundant-decls]
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:131:14: note: previous declaration of ‘bt_gatt_client_idle_register’ was here
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:135:6: error: redundant redeclaration of ‘bt_gatt_client_idle_unregister’ [-Werror=redundant-decls]
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:135:6: note: previous declaration of ‘bt_gatt_client_idle_unregister’ was here
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:137:6: error: redundant redeclaration of ‘bt_gatt_client_set_retry’ [-Werror=redundant-decls]
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:137:6: note: previous declaration of ‘bt_gatt_client_set_retry’ was here
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:15:24: error: redundant redeclaration of ‘bt_gatt_server_new’ [-Werror=redundant-decls]
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:15:24: note: previous declaration of ‘bt_gatt_server_new’ was here
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:18:10: error: redundant redeclaration of ‘bt_gatt_server_get_mtu’ [-Werror=redundant-decls]
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:18:10: note: previous declaration of ‘bt_gatt_server_get_mtu’ was here
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:19:16: error: redundant redeclaration of ‘bt_gatt_server_get_att’ [-Werror=redundant-decls]
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:19:16: note: previous declaration of ‘bt_gatt_server_get_att’ was here
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:21:24: error: redundant redeclaration of ‘bt_gatt_server_ref’ [-Werror=redundant-decls]
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:21:24: note: previous declaration of ‘bt_gatt_server_ref’ was here
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:22:6: error: redundant redeclaration of ‘bt_gatt_server_unref’ [-Werror=redundant-decls]
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:22:6: note: previous declaration of ‘bt_gatt_server_unref’ was here
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:28:6: error: redundant redeclaration of ‘bt_gatt_server_set_debug’ [-Werror=redundant-decls]
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:28:6: note: previous declaration of ‘bt_gatt_server_set_debug’ was here
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:36:6: error: redundant redeclaration of ‘bt_gatt_server_set_authorize’ [-Werror=redundant-decls]
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:36:6: note: previous declaration of ‘bt_gatt_server_set_authorize’ was here
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:40:6: error: redundant redeclaration of ‘bt_gatt_server_send_notification’ [-Werror=redundant-decls]
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:40:6: note: previous declaration of ‘bt_gatt_server_send_notification’ was here
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:44:6: error: redundant redeclaration of ‘bt_gatt_server_send_indication’ [-Werror=redundant-decls]
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:44:6: note: previous declaration of ‘bt_gatt_server_send_indication’ was here
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:11120: check] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:278:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:716:25: warning: Variable length array is used.
src/shared/bap.c:312:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:19:24: error: redundant redeclaration of ‘bt_gatt_client_new’ [-Werror=redundant-decls]
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:19:24: note: previous declaration of ‘bt_gatt_client_new’ was here
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:23:24: error: redundant redeclaration of ‘bt_gatt_client_clone’ [-Werror=redundant-decls]
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:23:24: note: previous declaration of ‘bt_gatt_client_clone’ was here
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:25:24: error: redundant redeclaration of ‘bt_gatt_client_ref’ [-Werror=redundant-decls]
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:25:24: note: previous declaration of ‘bt_gatt_client_ref’ was here
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:26:6: error: redundant redeclaration of ‘bt_gatt_client_unref’ [-Werror=redundant-decls]
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:26:6: note: previous declaration of ‘bt_gatt_client_unref’ was here
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:48:6: error: redundant redeclaration of ‘bt_gatt_client_is_ready’ [-Werror=redundant-decls]
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:48:6: note: previous declaration of ‘bt_gatt_client_is_ready’ was here
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:49:14: error: redundant redeclaration of ‘bt_gatt_client_ready_register’ [-Werror=redundant-decls]
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:49:14: note: previous declaration of ‘bt_gatt_client_ready_register’ was here
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:53:6: error: redundant redeclaration of ‘bt_gatt_client_ready_unregister’ [-Werror=redundant-decls]
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:53:6: note: previous declaration of ‘bt_gatt_client_ready_unregister’ was here
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:55:6: error: redundant redeclaration of ‘bt_gatt_client_set_service_changed’ [-Werror=redundant-decls]
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:55:6: note: previous declaration of ‘bt_gatt_client_set_service_changed’ was here
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:59:6: error: redundant redeclaration of ‘bt_gatt_client_set_debug’ [-Werror=redundant-decls]
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:59:6: note: previous declaration of ‘bt_gatt_client_set_debug’ was here
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:64:10: error: redundant redeclaration of ‘bt_gatt_client_get_mtu’ [-Werror=redundant-decls]
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:64:10: note: previous declaration of ‘bt_gatt_client_get_mtu’ was here
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:65:16: error: redundant redeclaration of ‘bt_gatt_client_get_att’ [-Werror=redundant-decls]
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:65:16: note: previous declaration of ‘bt_gatt_client_get_att’ was here
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:66:17: error: redundant redeclaration of ‘bt_gatt_client_get_db’ [-Werror=redundant-decls]
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:66:17: note: previous declaration of ‘bt_gatt_client_get_db’ was here
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:67:9: error: redundant redeclaration of ‘bt_gatt_client_get_features’ [-Werror=redundant-decls]
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:67:9: note: previous declaration of ‘bt_gatt_client_get_features’ was here
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:69:6: error: redundant redeclaration of ‘bt_gatt_client_cancel’ [-Werror=redundant-decls]
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:69:6: note: previous declaration of ‘bt_gatt_client_cancel’ was here
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:70:6: error: redundant redeclaration of ‘bt_gatt_client_cancel_all’ [-Werror=redundant-decls]
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:70:6: note: previous declaration of ‘bt_gatt_client_cancel_all’ was here
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:72:14: error: redundant redeclaration of ‘bt_gatt_client_read_value’ [-Werror=redundant-decls]
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:72:14: note: previous declaration of ‘bt_gatt_client_read_value’ was here
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:77:14: error: redundant redeclaration of ‘bt_gatt_client_read_long_value’ [-Werror=redundant-decls]
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:77:14: note: previous declaration of ‘bt_gatt_client_read_long_value’ was here
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:82:14: error: redundant redeclaration of ‘bt_gatt_client_read_multiple’ [-Werror=redundant-decls]
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:82:14: note: previous declaration of ‘bt_gatt_client_read_multiple’ was here
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:88:14: error: redundant redeclaration of ‘bt_gatt_client_write_without_response’ [-Werror=redundant-decls]
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:88:14: note: previous declaration of ‘bt_gatt_client_write_without_response’ was here
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:93:14: error: redundant redeclaration of ‘bt_gatt_client_write_value’ [-Werror=redundant-decls]
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:93:14: note: previous declaration of ‘bt_gatt_client_write_value’ was here
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:99:14: error: redundant redeclaration of ‘bt_gatt_client_write_long_value’ [-Werror=redundant-decls]
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:99:14: note: previous declaration of ‘bt_gatt_client_write_long_value’ was here
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:106:14: error: redundant redeclaration of ‘bt_gatt_client_prepare_write’ [-Werror=redundant-decls]
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:106:14: note: previous declaration of ‘bt_gatt_client_prepare_write’ was here
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:113:14: error: redundant redeclaration of ‘bt_gatt_client_write_execute’ [-Werror=redundant-decls]
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:113:14: note: previous declaration of ‘bt_gatt_client_write_execute’ was here
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:119:14: error: redundant redeclaration of ‘bt_gatt_client_register_notify’ [-Werror=redundant-decls]
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:119:14: note: previous declaration of ‘bt_gatt_client_register_notify’ was here
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:125:6: error: redundant redeclaration of ‘bt_gatt_client_unregister_notify’ [-Werror=redundant-decls]
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:125:6: note: previous declaration of ‘bt_gatt_client_unregister_notify’ was here
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:128:6: error: redundant redeclaration of ‘bt_gatt_client_set_security’ [-Werror=redundant-decls]
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:128:6: note: previous declaration of ‘bt_gatt_client_set_security’ was here
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:129:5: error: redundant redeclaration of ‘bt_gatt_client_get_security’ [-Werror=redundant-decls]
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:129:5: note: previous declaration of ‘bt_gatt_client_get_security’ was here
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:131:14: error: redundant redeclaration of ‘bt_gatt_client_idle_register’ [-Werror=redundant-decls]
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:131:14: note: previous declaration of ‘bt_gatt_client_idle_register’ was here
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:135:6: error: redundant redeclaration of ‘bt_gatt_client_idle_unregister’ [-Werror=redundant-decls]
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:135:6: note: previous declaration of ‘bt_gatt_client_idle_unregister’ was here
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:137:6: error: redundant redeclaration of ‘bt_gatt_client_set_retry’ [-Werror=redundant-decls]
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:137:6: note: previous declaration of ‘bt_gatt_client_set_retry’ was here
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:15:24: error: redundant redeclaration of ‘bt_gatt_server_new’ [-Werror=redundant-decls]
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:15:24: note: previous declaration of ‘bt_gatt_server_new’ was here
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:18:10: error: redundant redeclaration of ‘bt_gatt_server_get_mtu’ [-Werror=redundant-decls]
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:18:10: note: previous declaration of ‘bt_gatt_server_get_mtu’ was here
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:19:16: error: redundant redeclaration of ‘bt_gatt_server_get_att’ [-Werror=redundant-decls]
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:19:16: note: previous declaration of ‘bt_gatt_server_get_att’ was here
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:21:24: error: redundant redeclaration of ‘bt_gatt_server_ref’ [-Werror=redundant-decls]
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:21:24: note: previous declaration of ‘bt_gatt_server_ref’ was here
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:22:6: error: redundant redeclaration of ‘bt_gatt_server_unref’ [-Werror=redundant-decls]
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:22:6: note: previous declaration of ‘bt_gatt_server_unref’ was here
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:28:6: error: redundant redeclaration of ‘bt_gatt_server_set_debug’ [-Werror=redundant-decls]
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:28:6: note: previous declaration of ‘bt_gatt_server_set_debug’ was here
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:36:6: error: redundant redeclaration of ‘bt_gatt_server_set_authorize’ [-Werror=redundant-decls]
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:36:6: note: previous declaration of ‘bt_gatt_server_set_authorize’ was here
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:40:6: error: redundant redeclaration of ‘bt_gatt_server_send_notification’ [-Werror=redundant-decls]
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:40:6: note: previous declaration of ‘bt_gatt_server_send_notification’ was here
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:44:6: error: redundant redeclaration of ‘bt_gatt_server_send_indication’ [-Werror=redundant-decls]
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:44:6: note: previous declaration of ‘bt_gatt_server_send_indication’ was here
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: bluezmakeextell - FAIL
Desc: Build Bluez with External ELL
Output:
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:19:24: error: redundant redeclaration of ‘bt_gatt_client_new’ [-Werror=redundant-decls]
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:19:24: note: previous declaration of ‘bt_gatt_client_new’ was here
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:23:24: error: redundant redeclaration of ‘bt_gatt_client_clone’ [-Werror=redundant-decls]
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:23:24: note: previous declaration of ‘bt_gatt_client_clone’ was here
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:25:24: error: redundant redeclaration of ‘bt_gatt_client_ref’ [-Werror=redundant-decls]
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:25:24: note: previous declaration of ‘bt_gatt_client_ref’ was here
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:26:6: error: redundant redeclaration of ‘bt_gatt_client_unref’ [-Werror=redundant-decls]
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:26:6: note: previous declaration of ‘bt_gatt_client_unref’ was here
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:48:6: error: redundant redeclaration of ‘bt_gatt_client_is_ready’ [-Werror=redundant-decls]
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:48:6: note: previous declaration of ‘bt_gatt_client_is_ready’ was here
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:49:14: error: redundant redeclaration of ‘bt_gatt_client_ready_register’ [-Werror=redundant-decls]
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:49:14: note: previous declaration of ‘bt_gatt_client_ready_register’ was here
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:53:6: error: redundant redeclaration of ‘bt_gatt_client_ready_unregister’ [-Werror=redundant-decls]
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:53:6: note: previous declaration of ‘bt_gatt_client_ready_unregister’ was here
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:55:6: error: redundant redeclaration of ‘bt_gatt_client_set_service_changed’ [-Werror=redundant-decls]
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:55:6: note: previous declaration of ‘bt_gatt_client_set_service_changed’ was here
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:59:6: error: redundant redeclaration of ‘bt_gatt_client_set_debug’ [-Werror=redundant-decls]
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:59:6: note: previous declaration of ‘bt_gatt_client_set_debug’ was here
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:64:10: error: redundant redeclaration of ‘bt_gatt_client_get_mtu’ [-Werror=redundant-decls]
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:64:10: note: previous declaration of ‘bt_gatt_client_get_mtu’ was here
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:65:16: error: redundant redeclaration of ‘bt_gatt_client_get_att’ [-Werror=redundant-decls]
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:65:16: note: previous declaration of ‘bt_gatt_client_get_att’ was here
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:66:17: error: redundant redeclaration of ‘bt_gatt_client_get_db’ [-Werror=redundant-decls]
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:66:17: note: previous declaration of ‘bt_gatt_client_get_db’ was here
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:67:9: error: redundant redeclaration of ‘bt_gatt_client_get_features’ [-Werror=redundant-decls]
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:67:9: note: previous declaration of ‘bt_gatt_client_get_features’ was here
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:69:6: error: redundant redeclaration of ‘bt_gatt_client_cancel’ [-Werror=redundant-decls]
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:69:6: note: previous declaration of ‘bt_gatt_client_cancel’ was here
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:70:6: error: redundant redeclaration of ‘bt_gatt_client_cancel_all’ [-Werror=redundant-decls]
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:70:6: note: previous declaration of ‘bt_gatt_client_cancel_all’ was here
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:72:14: error: redundant redeclaration of ‘bt_gatt_client_read_value’ [-Werror=redundant-decls]
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:72:14: note: previous declaration of ‘bt_gatt_client_read_value’ was here
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:77:14: error: redundant redeclaration of ‘bt_gatt_client_read_long_value’ [-Werror=redundant-decls]
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:77:14: note: previous declaration of ‘bt_gatt_client_read_long_value’ was here
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:82:14: error: redundant redeclaration of ‘bt_gatt_client_read_multiple’ [-Werror=redundant-decls]
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:82:14: note: previous declaration of ‘bt_gatt_client_read_multiple’ was here
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:88:14: error: redundant redeclaration of ‘bt_gatt_client_write_without_response’ [-Werror=redundant-decls]
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:88:14: note: previous declaration of ‘bt_gatt_client_write_without_response’ was here
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:93:14: error: redundant redeclaration of ‘bt_gatt_client_write_value’ [-Werror=redundant-decls]
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:93:14: note: previous declaration of ‘bt_gatt_client_write_value’ was here
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:99:14: error: redundant redeclaration of ‘bt_gatt_client_write_long_value’ [-Werror=redundant-decls]
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:99:14: note: previous declaration of ‘bt_gatt_client_write_long_value’ was here
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:106:14: error: redundant redeclaration of ‘bt_gatt_client_prepare_write’ [-Werror=redundant-decls]
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:106:14: note: previous declaration of ‘bt_gatt_client_prepare_write’ was here
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:113:14: error: redundant redeclaration of ‘bt_gatt_client_write_execute’ [-Werror=redundant-decls]
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:113:14: note: previous declaration of ‘bt_gatt_client_write_execute’ was here
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:119:14: error: redundant redeclaration of ‘bt_gatt_client_register_notify’ [-Werror=redundant-decls]
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:119:14: note: previous declaration of ‘bt_gatt_client_register_notify’ was here
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:125:6: error: redundant redeclaration of ‘bt_gatt_client_unregister_notify’ [-Werror=redundant-decls]
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:125:6: note: previous declaration of ‘bt_gatt_client_unregister_notify’ was here
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:128:6: error: redundant redeclaration of ‘bt_gatt_client_set_security’ [-Werror=redundant-decls]
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:128:6: note: previous declaration of ‘bt_gatt_client_set_security’ was here
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:129:5: error: redundant redeclaration of ‘bt_gatt_client_get_security’ [-Werror=redundant-decls]
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:129:5: note: previous declaration of ‘bt_gatt_client_get_security’ was here
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:131:14: error: redundant redeclaration of ‘bt_gatt_client_idle_register’ [-Werror=redundant-decls]
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:131:14: note: previous declaration of ‘bt_gatt_client_idle_register’ was here
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:135:6: error: redundant redeclaration of ‘bt_gatt_client_idle_unregister’ [-Werror=redundant-decls]
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:135:6: note: previous declaration of ‘bt_gatt_client_idle_unregister’ was here
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:137:6: error: redundant redeclaration of ‘bt_gatt_client_set_retry’ [-Werror=redundant-decls]
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:137:6: note: previous declaration of ‘bt_gatt_client_set_retry’ was here
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:15:24: error: redundant redeclaration of ‘bt_gatt_server_new’ [-Werror=redundant-decls]
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:15:24: note: previous declaration of ‘bt_gatt_server_new’ was here
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:18:10: error: redundant redeclaration of ‘bt_gatt_server_get_mtu’ [-Werror=redundant-decls]
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:18:10: note: previous declaration of ‘bt_gatt_server_get_mtu’ was here
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:19:16: error: redundant redeclaration of ‘bt_gatt_server_get_att’ [-Werror=redundant-decls]
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:19:16: note: previous declaration of ‘bt_gatt_server_get_att’ was here
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:21:24: error: redundant redeclaration of ‘bt_gatt_server_ref’ [-Werror=redundant-decls]
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:21:24: note: previous declaration of ‘bt_gatt_server_ref’ was here
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:22:6: error: redundant redeclaration of ‘bt_gatt_server_unref’ [-Werror=redundant-decls]
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:22:6: note: previous declaration of ‘bt_gatt_server_unref’ was here
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:28:6: error: redundant redeclaration of ‘bt_gatt_server_set_debug’ [-Werror=redundant-decls]
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:28:6: note: previous declaration of ‘bt_gatt_server_set_debug’ was here
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:36:6: error: redundant redeclaration of ‘bt_gatt_server_set_authorize’ [-Werror=redundant-decls]
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:36:6: note: previous declaration of ‘bt_gatt_server_set_authorize’ was here
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:40:6: error: redundant redeclaration of ‘bt_gatt_server_send_notification’ [-Werror=redundant-decls]
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:40:6: note: previous declaration of ‘bt_gatt_server_send_notification’ was here
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:44:6: error: redundant redeclaration of ‘bt_gatt_server_send_indication’ [-Werror=redundant-decls]
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:44:6: note: previous declaration of ‘bt_gatt_server_send_indication’ was here
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
##############################
Test: ScanBuild - FAIL
Desc: Run Scan Build
Output:
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
gatt_db_unregister(op->client->db, op->db_id);
^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
discovery_op_complete(op, false, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:996:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1102:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1296:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1361:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1641:2: warning: Use of memory after it is freed
discover_all(op);
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1697:56: warning: Use of memory after it is freed
notify_data->chrc->ccc_write_id = notify_data->att_id = att_id;
~~~~~~~~~~~~~~~~~~~ ^
src/shared/gatt-client.c:2150:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2158:8: warning: Use of memory after it is freed
discovery_op_ref(op),
^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3183:2: warning: Use of memory after it is freed
complete_write_long_op(req, success, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3205:2: warning: Use of memory after it is freed
request_unref(req);
^~~~~~~~~~~~~~~~~~
13 warnings generated.
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:19:24: error: redundant redeclaration of ‘bt_gatt_client_new’ [-Werror=redundant-decls]
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:19:24: note: previous declaration of ‘bt_gatt_client_new’ was here
19 | struct bt_gatt_client *bt_gatt_client_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:23:24: error: redundant redeclaration of ‘bt_gatt_client_clone’ [-Werror=redundant-decls]
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:23:24: note: previous declaration of ‘bt_gatt_client_clone’ was here
23 | struct bt_gatt_client *bt_gatt_client_clone(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:25:24: error: redundant redeclaration of ‘bt_gatt_client_ref’ [-Werror=redundant-decls]
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:25:24: note: previous declaration of ‘bt_gatt_client_ref’ was here
25 | struct bt_gatt_client *bt_gatt_client_ref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:26:6: error: redundant redeclaration of ‘bt_gatt_client_unref’ [-Werror=redundant-decls]
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:26:6: note: previous declaration of ‘bt_gatt_client_unref’ was here
26 | void bt_gatt_client_unref(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:48:6: error: redundant redeclaration of ‘bt_gatt_client_is_ready’ [-Werror=redundant-decls]
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:48:6: note: previous declaration of ‘bt_gatt_client_is_ready’ was here
48 | bool bt_gatt_client_is_ready(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:49:14: error: redundant redeclaration of ‘bt_gatt_client_ready_register’ [-Werror=redundant-decls]
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:49:14: note: previous declaration of ‘bt_gatt_client_ready_register’ was here
49 | unsigned int bt_gatt_client_ready_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:53:6: error: redundant redeclaration of ‘bt_gatt_client_ready_unregister’ [-Werror=redundant-decls]
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:53:6: note: previous declaration of ‘bt_gatt_client_ready_unregister’ was here
53 | bool bt_gatt_client_ready_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:55:6: error: redundant redeclaration of ‘bt_gatt_client_set_service_changed’ [-Werror=redundant-decls]
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:55:6: note: previous declaration of ‘bt_gatt_client_set_service_changed’ was here
55 | bool bt_gatt_client_set_service_changed(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:59:6: error: redundant redeclaration of ‘bt_gatt_client_set_debug’ [-Werror=redundant-decls]
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:59:6: note: previous declaration of ‘bt_gatt_client_set_debug’ was here
59 | bool bt_gatt_client_set_debug(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:64:10: error: redundant redeclaration of ‘bt_gatt_client_get_mtu’ [-Werror=redundant-decls]
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:64:10: note: previous declaration of ‘bt_gatt_client_get_mtu’ was here
64 | uint16_t bt_gatt_client_get_mtu(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:65:16: error: redundant redeclaration of ‘bt_gatt_client_get_att’ [-Werror=redundant-decls]
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:65:16: note: previous declaration of ‘bt_gatt_client_get_att’ was here
65 | struct bt_att *bt_gatt_client_get_att(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:66:17: error: redundant redeclaration of ‘bt_gatt_client_get_db’ [-Werror=redundant-decls]
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:66:17: note: previous declaration of ‘bt_gatt_client_get_db’ was here
66 | struct gatt_db *bt_gatt_client_get_db(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:67:9: error: redundant redeclaration of ‘bt_gatt_client_get_features’ [-Werror=redundant-decls]
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:67:9: note: previous declaration of ‘bt_gatt_client_get_features’ was here
67 | uint8_t bt_gatt_client_get_features(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:69:6: error: redundant redeclaration of ‘bt_gatt_client_cancel’ [-Werror=redundant-decls]
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:69:6: note: previous declaration of ‘bt_gatt_client_cancel’ was here
69 | bool bt_gatt_client_cancel(struct bt_gatt_client *client, unsigned int id);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:70:6: error: redundant redeclaration of ‘bt_gatt_client_cancel_all’ [-Werror=redundant-decls]
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:70:6: note: previous declaration of ‘bt_gatt_client_cancel_all’ was here
70 | bool bt_gatt_client_cancel_all(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:72:14: error: redundant redeclaration of ‘bt_gatt_client_read_value’ [-Werror=redundant-decls]
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:72:14: note: previous declaration of ‘bt_gatt_client_read_value’ was here
72 | unsigned int bt_gatt_client_read_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:77:14: error: redundant redeclaration of ‘bt_gatt_client_read_long_value’ [-Werror=redundant-decls]
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:77:14: note: previous declaration of ‘bt_gatt_client_read_long_value’ was here
77 | unsigned int bt_gatt_client_read_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:82:14: error: redundant redeclaration of ‘bt_gatt_client_read_multiple’ [-Werror=redundant-decls]
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:82:14: note: previous declaration of ‘bt_gatt_client_read_multiple’ was here
82 | unsigned int bt_gatt_client_read_multiple(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:88:14: error: redundant redeclaration of ‘bt_gatt_client_write_without_response’ [-Werror=redundant-decls]
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:88:14: note: previous declaration of ‘bt_gatt_client_write_without_response’ was here
88 | unsigned int bt_gatt_client_write_without_response(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:93:14: error: redundant redeclaration of ‘bt_gatt_client_write_value’ [-Werror=redundant-decls]
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:93:14: note: previous declaration of ‘bt_gatt_client_write_value’ was here
93 | unsigned int bt_gatt_client_write_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:99:14: error: redundant redeclaration of ‘bt_gatt_client_write_long_value’ [-Werror=redundant-decls]
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:99:14: note: previous declaration of ‘bt_gatt_client_write_long_value’ was here
99 | unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:106:14: error: redundant redeclaration of ‘bt_gatt_client_prepare_write’ [-Werror=redundant-decls]
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:106:14: note: previous declaration of ‘bt_gatt_client_prepare_write’ was here
106 | unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:113:14: error: redundant redeclaration of ‘bt_gatt_client_write_execute’ [-Werror=redundant-decls]
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:113:14: note: previous declaration of ‘bt_gatt_client_write_execute’ was here
113 | unsigned int bt_gatt_client_write_execute(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:119:14: error: redundant redeclaration of ‘bt_gatt_client_register_notify’ [-Werror=redundant-decls]
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:119:14: note: previous declaration of ‘bt_gatt_client_register_notify’ was here
119 | unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:125:6: error: redundant redeclaration of ‘bt_gatt_client_unregister_notify’ [-Werror=redundant-decls]
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:125:6: note: previous declaration of ‘bt_gatt_client_unregister_notify’ was here
125 | bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:128:6: error: redundant redeclaration of ‘bt_gatt_client_set_security’ [-Werror=redundant-decls]
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:128:6: note: previous declaration of ‘bt_gatt_client_set_security’ was here
128 | bool bt_gatt_client_set_security(struct bt_gatt_client *client, int level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:129:5: error: redundant redeclaration of ‘bt_gatt_client_get_security’ [-Werror=redundant-decls]
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:129:5: note: previous declaration of ‘bt_gatt_client_get_security’ was here
129 | int bt_gatt_client_get_security(struct bt_gatt_client *client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:131:14: error: redundant redeclaration of ‘bt_gatt_client_idle_register’ [-Werror=redundant-decls]
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:131:14: note: previous declaration of ‘bt_gatt_client_idle_register’ was here
131 | unsigned int bt_gatt_client_idle_register(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:135:6: error: redundant redeclaration of ‘bt_gatt_client_idle_unregister’ [-Werror=redundant-decls]
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:135:6: note: previous declaration of ‘bt_gatt_client_idle_unregister’ was here
135 | bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:12,
from src/shared/rap.c:27:
./src/shared/gatt-client.h:137:6: error: redundant redeclaration of ‘bt_gatt_client_set_retry’ [-Werror=redundant-decls]
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:26:
./src/shared/gatt-client.h:137:6: note: previous declaration of ‘bt_gatt_client_set_retry’ was here
137 | bool bt_gatt_client_set_retry(struct bt_gatt_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:15:24: error: redundant redeclaration of ‘bt_gatt_server_new’ [-Werror=redundant-decls]
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:15:24: note: previous declaration of ‘bt_gatt_server_new’ was here
15 | struct bt_gatt_server *bt_gatt_server_new(struct gatt_db *db,
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:18:10: error: redundant redeclaration of ‘bt_gatt_server_get_mtu’ [-Werror=redundant-decls]
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:18:10: note: previous declaration of ‘bt_gatt_server_get_mtu’ was here
18 | uint16_t bt_gatt_server_get_mtu(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:19:16: error: redundant redeclaration of ‘bt_gatt_server_get_att’ [-Werror=redundant-decls]
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:19:16: note: previous declaration of ‘bt_gatt_server_get_att’ was here
19 | struct bt_att *bt_gatt_server_get_att(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:21:24: error: redundant redeclaration of ‘bt_gatt_server_ref’ [-Werror=redundant-decls]
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:21:24: note: previous declaration of ‘bt_gatt_server_ref’ was here
21 | struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:22:6: error: redundant redeclaration of ‘bt_gatt_server_unref’ [-Werror=redundant-decls]
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:22:6: note: previous declaration of ‘bt_gatt_server_unref’ was here
22 | void bt_gatt_server_unref(struct bt_gatt_server *server);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:28:6: error: redundant redeclaration of ‘bt_gatt_server_set_debug’ [-Werror=redundant-decls]
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:28:6: note: previous declaration of ‘bt_gatt_server_set_debug’ was here
28 | bool bt_gatt_server_set_debug(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:36:6: error: redundant redeclaration of ‘bt_gatt_server_set_authorize’ [-Werror=redundant-decls]
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:36:6: note: previous declaration of ‘bt_gatt_server_set_authorize’ was here
36 | bool bt_gatt_server_set_authorize(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:40:6: error: redundant redeclaration of ‘bt_gatt_server_send_notification’ [-Werror=redundant-decls]
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:40:6: note: previous declaration of ‘bt_gatt_server_send_notification’ was here
40 | bool bt_gatt_server_send_notification(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/shared/rap.h:13,
from src/shared/rap.c:27:
./src/shared/gatt-server.h:44:6: error: redundant redeclaration of ‘bt_gatt_server_send_indication’ [-Werror=redundant-decls]
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/shared/rap.c:25:
./src/shared/gatt-server.h:44:6: note: previous declaration of ‘bt_gatt_server_send_indication’ was here
44 | bool bt_gatt_server_send_indication(struct bt_gatt_server *server,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
src/shared/bap.c:1529:8: warning: Use of memory after it is freed
bap = bt_bap_ref_safe(bap);
^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2340:20: warning: Use of memory after it is freed
return queue_find(stream->bap->streams, NULL, stream);
^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
make: *** [Makefile:4272: all] Error 2
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Add Bluetooth Ranging Service (RAS) support
2026-01-27 7:47 [PATCH BlueZ v2 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
@ 2026-01-27 7:54 ` bluez.test.bot
0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2026-01-27 7:54 UTC (permalink / raw)
To: linux-bluetooth, prathibha.madugonde
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: corrupt patch at line 956
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Add Bluetooth Ranging Service (RAS) support
2026-01-27 10:03 [PATCH BlueZ v3 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
@ 2026-01-27 10:22 ` bluez.test.bot
0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2026-01-27 10:22 UTC (permalink / raw)
To: linux-bluetooth, prathibha.madugonde
[-- Attachment #1: Type: text/plain, Size: 16731 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1047491
---Test result---
Test Summary:
CheckPatch PENDING 0.36 seconds
GitLint PENDING 0.39 seconds
BuildEll PASS 20.21 seconds
BluezMake FAIL 19.08 seconds
MakeCheck FAIL 42.00 seconds
MakeDistcheck PASS 246.56 seconds
CheckValgrind FAIL 15.60 seconds
CheckSmatch FAIL 21.92 seconds
bluezmakeextell FAIL 13.90 seconds
IncrementalBuild PENDING 0.34 seconds
ScanBuild FAIL 35.98 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: BluezMake - FAIL
Desc: Build BlueZ
Output:
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7789: src/shared/libshared_glib_la-rap.lo] Error 1
make: *** [Makefile:11120: check] Error 2
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:11120: check] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:278:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:716:25: warning: Variable length array is used.
src/shared/bap.c:312:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: bluezmakeextell - FAIL
Desc: Build Bluez with External ELL
Output:
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8069: src/shared/libshared_mainloop_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
##############################
Test: ScanBuild - FAIL
Desc: Run Scan Build
Output:
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
gatt_db_unregister(op->client->db, op->db_id);
^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
discovery_op_complete(op, false, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:996:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1102:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1296:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1361:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1641:2: warning: Use of memory after it is freed
discover_all(op);
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1697:56: warning: Use of memory after it is freed
notify_data->chrc->ccc_write_id = notify_data->att_id = att_id;
~~~~~~~~~~~~~~~~~~~ ^
src/shared/gatt-client.c:2150:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2158:8: warning: Use of memory after it is freed
discovery_op_ref(op),
^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3183:2: warning: Use of memory after it is freed
complete_write_long_op(req, success, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3205:2: warning: Use of memory after it is freed
request_unref(req);
^~~~~~~~~~~~~~~~~~
13 warnings generated.
src/shared/rap.c:135:13: error: no previous declaration for ‘rap_get_ras’ [-Werror=missing-declarations]
135 | struct ras *rap_get_ras(struct bt_rap *rap)
| ^~~~~~~~~~~
src/shared/rap.c:636:21: error: ‘bt_rap_register_notify’ defined but not used [-Werror=unused-function]
636 | static unsigned int bt_rap_register_notify(struct bt_rap *rap,
| ^~~~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:598:13: error: ‘rap_pending_complete’ defined but not used [-Werror=unused-function]
598 | static void rap_pending_complete(bool success, uint8_t att_ecode,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:589:13: error: ‘rap_pending_destroy’ defined but not used [-Werror=unused-function]
589 | static void rap_pending_destroy(void *data)
| ^~~~~~~~~~~~~~~~~~~
src/shared/rap.c:301:13: error: ‘ras_realtime_read_cb’ defined but not used [-Werror=unused-function]
301 | static void ras_realtime_read_cb(struct gatt_db_attribute *attrib,
| ^~~~~~~~~~~~~~~~~~~~
src/shared/rap.c:124:26: error: ‘rap_get_rapdb’ defined but not used [-Werror=unused-function]
124 | static struct bt_rap_db *rap_get_rapdb(struct bt_rap *rap)
| ^~~~~~~~~~~~~
src/shared/rap.c:117:13: error: ‘on_demand_enabled’ defined but not used [-Werror=unused-variable]
117 | static bool on_demand_enabled;
| ^~~~~~~~~~~~~~~~~
src/shared/rap.c:116:13: error: ‘real_time_enabled’ defined but not used [-Werror=unused-variable]
116 | static bool real_time_enabled;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7523: src/shared/libshared_ell_la-rap.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
src/shared/bap.c:1529:8: warning: Use of memory after it is freed
bap = bt_bap_ref_safe(bap);
^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2340:20: warning: Use of memory after it is freed
return queue_find(stream->bap->streams, NULL, stream);
^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
make: *** [Makefile:4272: all] Error 2
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Add Bluetooth Ranging Service (RAS) support
2026-01-27 15:54 [PATCH BlueZ v4 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
@ 2026-01-27 16:34 ` bluez.test.bot
0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2026-01-27 16:34 UTC (permalink / raw)
To: linux-bluetooth, prathibha.madugonde
[-- Attachment #1: Type: text/plain, Size: 31134 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1047655
---Test result---
Test Summary:
CheckPatch PENDING 0.44 seconds
GitLint PENDING 0.28 seconds
BuildEll PASS 20.22 seconds
BluezMake FAIL 576.90 seconds
MakeCheck FAIL 193.02 seconds
MakeDistcheck PASS 243.87 seconds
CheckValgrind FAIL 166.35 seconds
CheckSmatch FAIL 251.85 seconds
bluezmakeextell FAIL 149.39 seconds
IncrementalBuild PENDING 0.38 seconds
ScanBuild FAIL 274.20 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: BluezMake - FAIL
Desc: Build BlueZ
Output:
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12984:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12984 | int main(int argc, char *argv[])
| ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
766 | int main(int argc, char *argv[])
| ^~~~
unit/test-avrcp.c: In function ‘main’:
unit/test-avrcp.c:989:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
989 | int main(int argc, char *argv[])
| ^~~~
unit/test-rap.c:99:13: error: ‘test_teardown_rap’ defined but not used [-Werror=unused-function]
99 | static void test_teardown_rap(const void *user_data)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7268: unit/test-rap.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:
unit/test-rap.c:99:13: error: ‘test_teardown_rap’ defined but not used [-Werror=unused-function]
99 | static void test_teardown_rap(const void *user_data)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7268: unit/test-rap.o] Error 1
make: *** [Makefile:11120: check] Error 2
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12984:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12984 | int main(int argc, char *argv[])
| ^~~~
unit/test-rap.c:99:13: error: ‘test_teardown_rap’ defined but not used [-Werror=unused-function]
99 | static void test_teardown_rap(const void *user_data)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7268: unit/test-rap.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:11120: check] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:278:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:716:25: warning: Variable length array is used.
src/shared/bap.c:312:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:278:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:716:25: warning: Variable length array is used.
src/shared/bap.c:312:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
tools/mesh-cfgtest.c:1453:17: warning: unknown escape sequence: '\%'
tools/sco-tester.c: note: in included file:
./lib/bluetooth/bluetooth.h:232:15: warning: array of flexible structures
./lib/bluetooth/bluetooth.h:237:31: warning: array of flexible structures
tools/bneptest.c:634:39: warning: unknown escape sequence: '\%'
tools/seq2bseq.c:57:26: warning: Variable length array is used.
tools/obex-client-tool.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
unit/avctp.c:505:34: warning: Variable length array is used.
unit/avctp.c:556:34: warning: Variable length array is used.
unit/test-avrcp.c:373:26: warning: Variable length array is used.
unit/test-avrcp.c:398:26: warning: Variable length array is used.
unit/test-avrcp.c:414:24: warning: Variable length array is used.
unit/avrcp-lib.c:1085:34: warning: Variable length array is used.
unit/avrcp-lib.c:1583:34: warning: Variable length array is used.
unit/avrcp-lib.c:1612:34: warning: Variable length array is used.
unit/avrcp-lib.c:1638:34: warning: Variable length array is used.
unit/test-rap.c:99:13: error: ‘test_teardown_rap’ defined but not used [-Werror=unused-function]
99 | static void test_teardown_rap(const void *user_data)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7268: unit/test-rap.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: bluezmakeextell - FAIL
Desc: Build Bluez with External ELL
Output:
unit/test-rap.c:99:13: error: ‘test_teardown_rap’ defined but not used [-Werror=unused-function]
99 | static void test_teardown_rap(const void *user_data)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7268: unit/test-rap.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
##############################
Test: ScanBuild - FAIL
Desc: Run Scan Build
Output:
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
gatt_db_unregister(op->client->db, op->db_id);
^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
discovery_op_complete(op, false, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:996:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1102:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1296:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1361:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1641:2: warning: Use of memory after it is freed
discover_all(op);
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1697:56: warning: Use of memory after it is freed
notify_data->chrc->ccc_write_id = notify_data->att_id = att_id;
~~~~~~~~~~~~~~~~~~~ ^
src/shared/gatt-client.c:2150:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2158:8: warning: Use of memory after it is freed
discovery_op_ref(op),
^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3183:2: warning: Use of memory after it is freed
complete_write_long_op(req, success, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3205:2: warning: Use of memory after it is freed
request_unref(req);
^~~~~~~~~~~~~~~~~~
13 warnings generated.
src/shared/bap.c:1529:8: warning: Use of memory after it is freed
bap = bt_bap_ref_safe(bap);
^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2340:20: warning: Use of memory after it is freed
return queue_find(stream->bap->streams, NULL, stream);
^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
gatt_db_unregister(op->client->db, op->db_id);
^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
discovery_op_complete(op, false, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:996:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1102:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1296:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1361:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1641:2: warning: Use of memory after it is freed
discover_all(op);
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1697:56: warning: Use of memory after it is freed
notify_data->chrc->ccc_write_id = notify_data->att_id = att_id;
~~~~~~~~~~~~~~~~~~~ ^
src/shared/gatt-client.c:2150:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2158:8: warning: Use of memory after it is freed
discovery_op_ref(op),
^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3183:2: warning: Use of memory after it is freed
complete_write_long_op(req, success, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3205:2: warning: Use of memory after it is freed
request_unref(req);
^~~~~~~~~~~~~~~~~~
13 warnings generated.
tools/hciattach.c:817:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 10)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:865:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 4)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:887:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 10)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:909:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 4)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:930:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 4)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:974:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 6)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
src/shared/bap.c:1529:8: warning: Use of memory after it is freed
bap = bt_bap_ref_safe(bap);
^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2340:20: warning: Use of memory after it is freed
return queue_find(stream->bap->streams, NULL, stream);
^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/oui.c:50:2: warning: Value stored to 'hwdb' is never read
hwdb = udev_hwdb_unref(hwdb);
^ ~~~~~~~~~~~~~~~~~~~~~
src/oui.c:53:2: warning: Value stored to 'udev' is never read
udev = udev_unref(udev);
^ ~~~~~~~~~~~~~~~~
2 warnings generated.
tools/hcidump.c:180:9: warning: Potential leak of memory pointed to by 'dp'
if (fds[i].fd == sock)
^~~
tools/hcidump.c:248:17: warning: Assigned value is garbage or undefined
dh->ts_sec = htobl(frm.ts.tv_sec);
^ ~~~~~~~~~~~~~~~~~~~~
tools/hcidump.c:326:9: warning: 1st function call argument is an uninitialized value
if (be32toh(dp.flags) & 0x02) {
^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:341:20: warning: 1st function call argument is an uninitialized value
frm.data_len = be32toh(dp.len);
^~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:346:14: warning: 1st function call argument is an uninitialized value
opcode = be32toh(dp.flags) & 0xffff;
^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:384:17: warning: Assigned value is garbage or undefined
frm.data_len = btohs(dh.len);
^ ~~~~~~~~~~~~~
tools/hcidump.c:394:11: warning: Assigned value is garbage or undefined
frm.len = frm.data_len;
^ ~~~~~~~~~~~~
tools/hcidump.c:398:9: warning: 1st function call argument is an uninitialized value
ts = be64toh(ph.ts);
^~~~~~~~~~~~~~
/usr/include/endian.h:51:22: note: expanded from macro 'be64toh'
# define be64toh(x) __bswap_64 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:403:13: warning: 1st function call argument is an uninitialized value
frm.in = be32toh(dp.flags) & 0x01;
^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:408:11: warning: Assigned value is garbage or undefined
frm.in = dh.in;
^ ~~~~~
tools/hcidump.c:437:7: warning: Null pointer passed to 1st parameter expecting 'nonnull'
fd = open(file, open_flags, 0644);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 warnings generated.
tools/rfcomm.c:234:3: warning: Value stored to 'i' is never read
i = execvp(cmdargv[0], cmdargv);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:234:7: warning: Null pointer passed to 1st parameter expecting 'nonnull'
i = execvp(cmdargv[0], cmdargv);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:354:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd'
if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:497:14: warning: Assigned value is garbage or undefined
req.channel = raddr.rc_channel;
^ ~~~~~~~~~~~~~~~~
tools/rfcomm.c:515:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd'
if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
tools/ciptool.c:351:7: warning: 5th function call argument is an uninitialized value
sk = do_connect(ctl, dev_id, &src, &dst, psm, (1 << CMTP_LOOPBACK));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
src/sdp-xml.c:126:10: warning: Assigned value is garbage or undefined
buf[1] = data[i + 1];
^ ~~~~~~~~~~~
src/sdp-xml.c:306:11: warning: Assigned value is garbage or undefined
buf[1] = data[i + 1];
^ ~~~~~~~~~~~
src/sdp-xml.c:344:11: warning: Assigned value is garbage or undefined
buf[1] = data[i + 1];
^ ~~~~~~~~~~~
3 warnings generated.
tools/sdptool.c:941:26: warning: Result of 'malloc' is converted to a pointer of type 'uint32_t', which is incompatible with sizeof operand type 'int'
uint32_t *value_int = malloc(sizeof(int));
~~~~~~~~~~ ^~~~~~ ~~~~~~~~~~~
tools/sdptool.c:980:4: warning: 1st function call argument is an uninitialized value
free(allocArray[i]);
^~~~~~~~~~~~~~~~~~~
tools/sdptool.c:3777:2: warning: Potential leak of memory pointed to by 'si.name'
return add_service(0, &si);
^~~~~~~~~~~~~~~~~~~~~~~~~~
tools/sdptool.c:4112:4: warning: Potential leak of memory pointed to by 'context.svc'
return -1;
^~~~~~~~~
4 warnings generated.
tools/avtest.c:243:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:253:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:262:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:276:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:283:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:290:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:297:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:309:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:313:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:322:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:326:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:335:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:342:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:364:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:368:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:377:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:381:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:394:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:398:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:405:4: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:415:4: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:580:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:588:3: warning: Value stored to 'len' is never read
len = write(sk, buf, invalid ? 2 : 3);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:602:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 4 + media_transport_size);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:615:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:625:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:637:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:652:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:664:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:673:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:680:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:716:2: warning: Value stored to 'len' is never read
len = write(sk, buf, AVCTP_HEADER_LENGTH + sizeof(play_pressed));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 warnings generated.
tools/btproxy.c:836:15: warning: Null pointer passed to 1st parameter expecting 'nonnull'
tcp_port = atoi(optarg);
^~~~~~~~~~~~
tools/btproxy.c:839:8: warning: Null pointer passed to 1st parameter expecting 'nonnull'
if (strlen(optarg) > 3 && !strncmp(optarg, "hci", 3))
^~~~~~~~~~~~~~
2 warnings generated.
tools/create-image.c:76:3: warning: Value stored to 'fd' is never read
fd = -1;
^ ~~
tools/create-image.c:84:3: warning: Value stored to 'fd' is never read
fd = -1;
^ ~~
tools/create-image.c:92:3: warning: Value stored to 'fd' is never read
fd = -1;
^ ~~
tools/create-image.c:105:2: warning: Value stored to 'fd' is never read
fd = -1;
^ ~~
4 warnings generated.
tools/check-selftest.c:42:3: warning: Value stored to 'ptr' is never read
ptr = fgets(result, sizeof(result), fp);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/btgatt-client.c:1824:2: warning: Value stored to 'argv' is never read
argv += optind;
^ ~~~~~~
1 warning generated.
tools/btgatt-server.c:1212:2: warning: Value stored to 'argv' is never read
argv -= optind;
^ ~~~~~~
1 warning generated.
tools/gatt-service.c:294:2: warning: 2nd function call argument is an uninitialized value
chr_write(chr, value, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/obex-server-tool.c:133:13: warning: Null pointer passed to 1st parameter expecting 'nonnull'
data->fd = open(name, O_WRONLY | O_CREAT | O_NOCTTY, 0600);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/obex-server-tool.c:192:13: warning: Null pointer passed to 1st parameter expecting 'nonnull'
data->fd = open(name, O_RDONLY | O_NOCTTY, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
tools/btpclientctl.c:402:3: warning: Value stored to 'bit' is never read
bit = 0;
^ ~
tools/btpclientctl.c:1655:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull'
memcpy(cp->data, ad_data, ad_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/sdp-client.c:353:14: warning: Access to field 'cb' results in a dereference of a null pointer
(*ctxt)->cb = cb;
~~~~~~~~~~~~^~~~
1 warning generated.
src/sdpd-request.c:211:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint16_t'
pElem = malloc(sizeof(uint16_t));
^~~~~~ ~~~~~~~~~~~~~~~~
src/sdpd-request.c:239:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint32_t'
pElem = malloc(sizeof(uint32_t));
^~~~~~ ~~~~~~~~~~~~~~~~
2 warnings generated.
src/gatt-database.c:1175:10: warning: Value stored to 'bits' during its initialization is never read
uint8_t bits[] = { BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING,
^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
src/gatt-client.c:1569:2: warning: Use of memory after it is freed
notify_client_unref(client);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
unit/avrcp-lib.c:1968:3: warning: 1st function call argument is an uninitialized value
g_free(text[i]);
^~~~~~~~~~~~~~~
1 warning generated.
unit/avdtp.c:756:25: warning: Use of memory after it is freed
session->prio_queue = g_slist_remove(session->prio_queue, req);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unit/avdtp.c:763:24: warning: Use of memory after it is freed
session->req_queue = g_slist_remove(session->req_queue, req);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
unit/test-rap.c:99:13: error: ‘test_teardown_rap’ defined but not used [-Werror=unused-function]
99 | static void test_teardown_rap(const void *user_data)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7268: unit/test-rap.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4272: all] Error 2
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-01-27 16:34 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 6:47 [PATCH BlueZ v1 0/5] Add Bluetooth Ranging Service (RAS) support Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
2026-01-27 7:04 ` Add Bluetooth Ranging Service (RAS) support bluez.test.bot
2026-01-27 6:47 ` [PATCH BlueZ v1 2/5] monitor: Add support for Ranging Service (RAS) Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 3/5] Implement the Bluetooth Ranging Profile GATT server and client support as specified by the Bluetooth SIG: Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 4/5] unit: Add test cases for Ranging Profile (RAP) Prathibha Madugonde
2026-01-27 6:47 ` [PATCH BlueZ v1 5/5] profiles: Add Ranging Profile (RAP) implementation Prathibha Madugonde
-- strict thread matches above, loose matches on Subject: below --
2026-01-27 7:47 [PATCH BlueZ v2 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
2026-01-27 7:54 ` Add Bluetooth Ranging Service (RAS) support bluez.test.bot
2026-01-27 10:03 [PATCH BlueZ v3 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
2026-01-27 10:22 ` Add Bluetooth Ranging Service (RAS) support bluez.test.bot
2026-01-27 15:54 [PATCH BlueZ v4 1/5] lib/uuid: Add RAS service and characteristic UUIDs Prathibha Madugonde
2026-01-27 16:34 ` Add Bluetooth Ranging Service (RAS) support bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox