From 2130ca1ec72d57c6158fcfb09491dd5072aaf1a9 Mon Sep 17 00:00:00 2001 From: "h.sandeep" Date: Fri, 16 Dec 2016 13:55:09 +0530 Subject: [PATCH] DPM: Fix DPM GCC6 warning errors. Change-Id: I152f2a1a11757ef180655e27d063510a47847fd5 Signed-off-by: h.sandeep --- bt-service/bt-service-dpm.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/bt-service/bt-service-dpm.c b/bt-service/bt-service-dpm.c index 27cb1f2..908f12c 100644 --- a/bt-service/bt-service-dpm.c +++ b/bt-service/bt-service-dpm.c @@ -32,19 +32,19 @@ #include "bt-service-dpm.h" static dpm_policy_t policy_table[DPM_POLICY_END] = { - [DPM_POLICY_ALLOW_BLUETOOTH] = { {DPM_BT_ERROR} }, - [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = { {DPM_STATUS_ERROR} }, - [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = { {DPM_STATUS_ERROR} }, - [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = { {NULL} }, - [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = { {NULL} }, - [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = { {NULL} }, - [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = { {NULL} }, - [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = { {DPM_STATUS_ERROR} }, - [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = { {DPM_STATUS_ERROR} }, - [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = { {DPM_STATUS_ERROR} }, - [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = { {DPM_STATUS_ERROR} }, - [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = { {DPM_STATUS_ERROR} }, - [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = { {DPM_STATUS_ERROR} }, + [DPM_POLICY_ALLOW_BLUETOOTH] = { {DPM_BT_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = { {DPM_STATUS_ERROR, NULL} }, + [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = { {DPM_STATUS_ERROR, NULL} }, }; @@ -481,9 +481,10 @@ int _bt_dpm_clear_bluetooth_uuids_from_blacklist(void) for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list; l; l = g_slist_next(l)) { char *l_uuid = l->data; - if (l_uuid) + if (l_uuid) { policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid); g_free(l_uuid); + } } g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list); policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = NULL; -- 2.7.4