[PATCH 06/12] android/hal-gatt: Remove unneeded never read initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

Fixes clang warning:
...
android/hal-gatt.c:1021:3: warning: Value stored to 'data' is never read
                data += service_uuid_len;
                ^       ~~~~~~~~~~~~~~~~
1 warning generated.
...
---
 android/hal-gatt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/android/hal-gatt.c b/android/hal-gatt.c
index 1cc4897..c563fe9 100644
--- a/android/hal-gatt.c
+++ b/android/hal-gatt.c
@@ -1016,10 +1016,8 @@ static bt_status_t set_adv_data_real(int server_if, bool set_scan_rsp,
 		data += service_data_len;
 	}
 
-	if (service_uuid && service_uuid_len) {
+	if (service_uuid && service_uuid_len)
 		memcpy(data, service_uuid, service_uuid_len);
-		data += service_uuid_len;
-	}
 
 	return hal_ipc_cmd(HAL_SERVICE_ID_GATT, HAL_OP_GATT_CLIENT_SET_ADV_DATA,
 						cmd_len, cmd, NULL, NULL, NULL);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux