]> granicus.if.org Git - esp-idf/commitdiff
Bluedroid: remove warnings about discarding "const" for "const char*"
authorRoland Dobai <dobai.roland@gmail.com>
Fri, 11 May 2018 09:08:58 +0000 (11:08 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Fri, 11 May 2018 09:29:10 +0000 (11:29 +0200)
components/bt/bluedroid/bta/dm/bta_dm_api.c
components/bt/bluedroid/bta/include/bta/bta_api.h
components/bt/bluedroid/bta/jv/bta_jv_act.c
components/bt/bluedroid/btc/core/btc_dm.c
components/bt/bluedroid/stack/gap/gap_conn.c
components/bt/bluedroid/stack/include/stack/gap_api.h

index fdd5f97a93be553940bc7a1734ca5bfc656e6aaf..6564adc8243137300619c7946698ae69f70c108c 100644 (file)
@@ -166,7 +166,7 @@ void BTA_DisableTestMode(void)
 ** Returns          void
 **
 *******************************************************************************/
-void BTA_DmSetDeviceName(char *p_name)
+void BTA_DmSetDeviceName(const char *p_name)
 {
 
     tBTA_DM_API_SET_NAME    *p_msg;
index b2ef0ecd3acb0abecb06fe0d366c5574e6adb65a..ae645f5753fa8914e395ff23405512841ed7e039 100644 (file)
@@ -1416,7 +1416,7 @@ extern void BTA_DisableTestMode(void);
 ** Returns          void
 **
 *******************************************************************************/
-extern void BTA_DmSetDeviceName(char *p_name);
+extern void BTA_DmSetDeviceName(const char *p_name);
 
 extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove,  BD_ADDR remote_addr, tBTA_ADD_WHITELIST_CBACK *add_wl_cb);
 
index 9ce667745604cd2df9d41739146f7239e02b4b4f..12dfd13b2533fe931d2efc360c8d089aef30d1e1 100644 (file)
@@ -951,7 +951,7 @@ static bool create_base_record(const uint32_t sdp_handle, const char *name, cons
         proto_list[2].num_params = 0;
     }
 
-    char *stage = "protocol_list";
+    const char *stage = "protocol_list";
     if (!SDP_AddProtocolList(sdp_handle, num_proto_elements, proto_list)){
         APPL_TRACE_ERROR("create_base_record: failed to create base service "
                    "record, stage: %s, scn: %d, name: %s, with_obex: %d",
@@ -1000,7 +1000,7 @@ static int add_spp_sdp(const char *name, const int channel) {
     }
 
     // Create the base SDP record.
-    char *stage = "create_base_record";
+    const char *stage = "create_base_record";
     if (!create_base_record(handle, name, channel, FALSE /* with_obex */)){
         SDP_DeleteRecord(handle);
         APPL_TRACE_ERROR("add_spp_sdp: failed to register SPP service, "
@@ -2769,4 +2769,4 @@ extern void bta_jv_l2cap_close_fixed (tBTA_JV_MSG *p_data)
 }
 
 
-#endif  ///defined BTA_JV_INCLUDED && BTA_JV_INCLUDED == TRUE
\ No newline at end of file
+#endif  ///defined BTA_JV_INCLUDED && BTA_JV_INCLUDED == TRUE
index d6d41e2346f05c3bff6b3379be695d9d80d2354e..8bc2370ad447050ecfaa66f05306d80312e32153 100644 (file)
@@ -454,7 +454,7 @@ void btc_dm_sec_cb_handler(btc_msg_t *msg)
 
         /* Set initial device name, it can be overwritten later */
         if (p_data->enable.status == BTA_SUCCESS) {
-            char *initial_device_name = "ESP32";
+            const char *initial_device_name = "ESP32";
             BTA_DmSetDeviceName(initial_device_name);
         }
         btc_enable_bluetooth_evt(p_data->enable.status);
index 3ca81d082c97d23dad2cf39aebdaded2702c2924..ecb7b726f5510e3243c2d35d84fbb3cc54a0efdf 100644 (file)
@@ -123,7 +123,7 @@ void gap_conn_init (void)
 ** Returns          handle of the connection if successful, else GAP_INVALID_HANDLE
 **
 *******************************************************************************/
-UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
+UINT16 GAP_ConnOpen (const char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
                      BD_ADDR p_rem_bda, UINT16 psm, tL2CAP_CFG_INFO *p_cfg,
                      tL2CAP_ERTM_INFO *ertm_info, UINT16 security, UINT8 chan_mode_mask,
                      tGAP_CONN_CALLBACK *p_cb)
index 031247f7c0dbf0e45597869bc44e73b4f501bba0..5d8d87645d9d59ddeb97b641c394ec9d3ee4c893 100644 (file)
@@ -140,7 +140,7 @@ typedef void (tGAP_BLE_CMPL_CBACK)(BOOLEAN status, BD_ADDR addr, UINT16 length,
 ** Returns          handle of the connection if successful, else GAP_INVALID_HANDLE
 **
 *******************************************************************************/
-extern UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
+extern UINT16 GAP_ConnOpen (const char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
                             BD_ADDR p_rem_bda, UINT16 psm, tL2CAP_CFG_INFO *p_cfg,
                             tL2CAP_ERTM_INFO *ertm_info,
                             UINT16 security, UINT8 chan_mode_mask, tGAP_CONN_CALLBACK *p_cb);