Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77d05399 authored by Myles Watson's avatar Myles Watson
Browse files

Remove deprecated UNUSED macro (1/5)

Generated automatically with coccinelle

/* This rule matches functions with arguments
 * that have an UNUSED(arg) in the body.
 */
@r1@
identifier arg;
identifier fn;
type t;
parameter list[n] P;
@@

fn(P, const t arg) { ...
 UNUSED(arg);
 ...
 }

/* This rule removes the UNUSED line, and adds
 * UNUSED_ATTR to the parameter list.
 */
@depends on r1@
identifier r1.arg;
identifier r1.fn;
type r1.t;
parameter list[r1.n] r1.P;
typedef UNUSED_ATTR;
@@

fn(P,
- const t arg
+ UNUSED_ATTR GETRIDOFTHISCOMMA, const t arg
 ) { ...
-UNUSED(arg);
 ...
 }

Test: mma -j32

Change-Id: Idcaadd688d669d484e557becd050e69454508f3c
parent 21aac5bd
Loading
Loading
Loading
Loading
+42 −81
Original line number Original line Diff line number Diff line
@@ -145,14 +145,12 @@ static void a2dp_open_ctrl_path(struct a2dp_stream_common *common);


/* logs timestamp with microsec precision
/* logs timestamp with microsec precision
   pprev is optional in case a dedicated diff is required */
   pprev is optional in case a dedicated diff is required */
static void ts_log(const char *tag, int val, struct timespec *pprev_opt)
static void ts_log(UNUSED_ATTR const char *tag, UNUSED_ATTR int val, struct timespec *pprev_opt)
{
{
    struct timespec now;
    struct timespec now;
    static struct timespec prev = {0,0};
    static struct timespec prev = {0,0};
    unsigned long long now_us;
    unsigned long long now_us;
    unsigned long long diff_us;
    unsigned long long diff_us;
    UNUSED(tag);
    UNUSED(val);


    clock_gettime(CLOCK_MONOTONIC, &now);
    clock_gettime(CLOCK_MONOTONIC, &now);


@@ -683,10 +681,9 @@ static audio_format_t out_get_format(const struct audio_stream *stream)
    return (audio_format_t)out->common.cfg.format;
    return (audio_format_t)out->common.cfg.format;
}
}


static int out_set_format(struct audio_stream *stream, audio_format_t format)
static int out_set_format(UNUSED_ATTR struct audio_stream *stream,
                          UNUSED_ATTR audio_format_t format)
{
{
    UNUSED(stream);
    UNUSED(format);
    DEBUG("setting format not yet supported (0x%x)", format);
    DEBUG("setting format not yet supported (0x%x)", format);
    return -ENOSYS;
    return -ENOSYS;
}
}
@@ -708,9 +705,8 @@ static int out_standby(struct audio_stream *stream)
    return retVal;
    return retVal;
}
}


static int out_dump(const struct audio_stream *stream, int fd)
static int out_dump(UNUSED_ATTR const struct audio_stream *stream, int fd)
{
{
    UNUSED(stream);
    UNUSED(fd);
    UNUSED(fd);
    FNLOG();
    FNLOG();
    return 0;
    return 0;
@@ -760,9 +756,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
    return status;
    return status;
}
}


static char * out_get_parameters(const struct audio_stream *stream, const char *keys)
static char * out_get_parameters(UNUSED_ATTR const struct audio_stream *stream, const char *keys)
{
{
    UNUSED(stream);
    UNUSED(keys);
    UNUSED(keys);
    FNLOG();
    FNLOG();


@@ -787,12 +782,9 @@ static uint32_t out_get_latency(const struct audio_stream_out *stream)
    return (latency_us / 1000) + 200;
    return (latency_us / 1000) + 200;
}
}


static int out_set_volume(struct audio_stream_out *stream, float left,
static int out_set_volume(UNUSED_ATTR struct audio_stream_out *stream, UNUSED_ATTR float left,
                          float right)
                          UNUSED_ATTR float right)
{
{
    UNUSED(stream);
    UNUSED(left);
    UNUSED(right);


    FNLOG();
    FNLOG();


@@ -842,18 +834,16 @@ static int out_get_render_position(const struct audio_stream_out *stream,
    return 0;
    return 0;
}
}


static int out_add_audio_effect(const struct audio_stream *stream, effect_handle_t effect)
static int out_add_audio_effect(UNUSED_ATTR const struct audio_stream *stream, effect_handle_t effect)
{
{
    UNUSED(stream);
    UNUSED(effect);
    UNUSED(effect);


    FNLOG();
    FNLOG();
    return 0;
    return 0;
}
}


static int out_remove_audio_effect(const struct audio_stream *stream, effect_handle_t effect)
static int out_remove_audio_effect(UNUSED_ATTR const struct audio_stream *stream, effect_handle_t effect)
{
{
    UNUSED(stream);
    UNUSED(effect);
    UNUSED(effect);


    FNLOG();
    FNLOG();
@@ -884,9 +874,8 @@ static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate)
        return -1;
        return -1;
}
}


static size_t in_get_buffer_size(const struct audio_stream *stream)
static size_t in_get_buffer_size(UNUSED_ATTR const struct audio_stream *stream)
{
{
    UNUSED(stream);


    FNLOG();
    FNLOG();
    return 320;
    return 320;
@@ -900,18 +889,16 @@ static uint32_t in_get_channels(const struct audio_stream *stream)
    return in->common.cfg.channel_flags;
    return in->common.cfg.channel_flags;
}
}


static audio_format_t in_get_format(const struct audio_stream *stream)
static audio_format_t in_get_format(UNUSED_ATTR const struct audio_stream *stream)
{
{
    UNUSED(stream);


    FNLOG();
    FNLOG();
    return AUDIO_FORMAT_PCM_16_BIT;
    return AUDIO_FORMAT_PCM_16_BIT;
}
}


static int in_set_format(struct audio_stream *stream, audio_format_t format)
static int in_set_format(UNUSED_ATTR struct audio_stream *stream,
                         UNUSED_ATTR audio_format_t format)
{
{
    UNUSED(stream);
    UNUSED(format);


    FNLOG();
    FNLOG();
    if (format == AUDIO_FORMAT_PCM_16_BIT)
    if (format == AUDIO_FORMAT_PCM_16_BIT)
@@ -920,46 +907,41 @@ static int in_set_format(struct audio_stream *stream, audio_format_t format)
        return -1;
        return -1;
}
}


static int in_standby(struct audio_stream *stream)
static int in_standby(UNUSED_ATTR struct audio_stream *stream)
{
{
    UNUSED(stream);


    FNLOG();
    FNLOG();
    return 0;
    return 0;
}
}


static int in_dump(const struct audio_stream *stream, int fd)
static int in_dump(UNUSED_ATTR const struct audio_stream *stream, int fd)
{
{
    UNUSED(stream);
    UNUSED(fd);
    UNUSED(fd);


    FNLOG();
    FNLOG();
    return 0;
    return 0;
}
}


static int in_set_parameters(struct audio_stream *stream, const char *kvpairs)
static int in_set_parameters(UNUSED_ATTR struct audio_stream *stream,
                             UNUSED_ATTR const char *kvpairs)
{
{
    UNUSED(stream);
    UNUSED(kvpairs);


    FNLOG();
    FNLOG();
    return 0;
    return 0;
}
}


static char * in_get_parameters(const struct audio_stream *stream,
static char * in_get_parameters(UNUSED_ATTR const struct audio_stream *stream,
                                const char *keys)
                                const char *keys)
{
{
    UNUSED(stream);
    UNUSED(keys);
    UNUSED(keys);


    FNLOG();
    FNLOG();
    return strdup("");
    return strdup("");
}
}


static int in_set_gain(struct audio_stream_in *stream, float gain)
static int in_set_gain(UNUSED_ATTR struct audio_stream_in *stream,
                       UNUSED_ATTR float gain)
{
{
    UNUSED(stream);
    UNUSED(gain);


    FNLOG();
    FNLOG();
    return 0;
    return 0;
@@ -1031,26 +1013,23 @@ error:
    return bytes;
    return bytes;
}
}


static uint32_t in_get_input_frames_lost(struct audio_stream_in *stream)
static uint32_t in_get_input_frames_lost(UNUSED_ATTR struct audio_stream_in *stream)
{
{
    UNUSED(stream);


    FNLOG();
    FNLOG();
    return 0;
    return 0;
}
}


static int in_add_audio_effect(const struct audio_stream *stream, effect_handle_t effect)
static int in_add_audio_effect(UNUSED_ATTR const struct audio_stream *stream, effect_handle_t effect)
{
{
    UNUSED(stream);
    UNUSED(effect);
    UNUSED(effect);


    FNLOG();
    FNLOG();
    return 0;
    return 0;
}
}


static int in_remove_audio_effect(const struct audio_stream *stream, effect_handle_t effect)
static int in_remove_audio_effect(UNUSED_ATTR const struct audio_stream *stream, effect_handle_t effect)
{
{
    UNUSED(stream);
    UNUSED(effect);
    UNUSED(effect);


    FNLOG();
    FNLOG();
@@ -1059,21 +1038,17 @@ static int in_remove_audio_effect(const struct audio_stream *stream, effect_hand
}
}


static int adev_open_output_stream(struct audio_hw_device *dev,
static int adev_open_output_stream(struct audio_hw_device *dev,
                                   audio_io_handle_t handle,
                                   UNUSED_ATTR audio_io_handle_t handle,
                                   audio_devices_t devices,
                                   UNUSED_ATTR audio_devices_t devices,
                                   audio_output_flags_t flags,
                                   UNUSED_ATTR audio_output_flags_t flags,
                                   struct audio_config *config,
                                   struct audio_config *config,
                                   struct audio_stream_out **stream_out,
                                   struct audio_stream_out **stream_out,
                                   const char *address)
                                   UNUSED_ATTR const char *address)


{
{
    struct a2dp_audio_device *a2dp_dev = (struct a2dp_audio_device *)dev;
    struct a2dp_audio_device *a2dp_dev = (struct a2dp_audio_device *)dev;
    struct a2dp_stream_out *out;
    struct a2dp_stream_out *out;
    int ret = 0;
    int ret = 0;
    UNUSED(address);
    UNUSED(handle);
    UNUSED(devices);
    UNUSED(flags);


    INFO("opening output");
    INFO("opening output");


@@ -1179,11 +1154,9 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
    return retval;
    return retval;
}
}


static char * adev_get_parameters(const struct audio_hw_device *dev,
static char * adev_get_parameters(UNUSED_ATTR const struct audio_hw_device *dev,
                                  const char *keys)
                                  const char *keys)
{
{
    UNUSED(dev);

    FNLOG();
    FNLOG();


    std::unordered_map<std::string, std::string> params =
    std::unordered_map<std::string, std::string> params =
@@ -1193,17 +1166,16 @@ static char * adev_get_parameters(const struct audio_hw_device *dev,
    return strdup("");
    return strdup("");
}
}


static int adev_init_check(const struct audio_hw_device *dev)
static int adev_init_check(UNUSED_ATTR const struct audio_hw_device *dev)
{
{
    UNUSED(dev);
    
    FNLOG();
    FNLOG();


    return 0;
    return 0;
}
}


static int adev_set_voice_volume(struct audio_hw_device *dev, float volume)
static int adev_set_voice_volume(UNUSED_ATTR struct audio_hw_device *dev, float volume)
{
{
    UNUSED(dev);
    UNUSED(volume);
    UNUSED(volume);


    FNLOG();
    FNLOG();
@@ -1211,9 +1183,8 @@ static int adev_set_voice_volume(struct audio_hw_device *dev, float volume)
    return -ENOSYS;
    return -ENOSYS;
}
}


static int adev_set_master_volume(struct audio_hw_device *dev, float volume)
static int adev_set_master_volume(UNUSED_ATTR struct audio_hw_device *dev, float volume)
{
{
    UNUSED(dev);
    UNUSED(volume);
    UNUSED(volume);


    FNLOG();
    FNLOG();
@@ -1221,9 +1192,8 @@ static int adev_set_master_volume(struct audio_hw_device *dev, float volume)
    return -ENOSYS;
    return -ENOSYS;
}
}


static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode)
static int adev_set_mode(UNUSED_ATTR struct audio_hw_device *dev, audio_mode_t mode)
{
{
    UNUSED(dev);
    UNUSED(mode);
    UNUSED(mode);


    FNLOG();
    FNLOG();
@@ -1231,9 +1201,8 @@ static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode)
    return 0;
    return 0;
}
}


static int adev_set_mic_mute(struct audio_hw_device *dev, bool state)
static int adev_set_mic_mute(UNUSED_ATTR struct audio_hw_device *dev, bool state)
{
{
    UNUSED(dev);
    UNUSED(state);
    UNUSED(state);


    FNLOG();
    FNLOG();
@@ -1241,9 +1210,8 @@ static int adev_set_mic_mute(struct audio_hw_device *dev, bool state)
    return -ENOSYS;
    return -ENOSYS;
}
}


static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state)
static int adev_get_mic_mute(UNUSED_ATTR const struct audio_hw_device *dev, bool *state)
{
{
    UNUSED(dev);
    UNUSED(state);
    UNUSED(state);


    FNLOG();
    FNLOG();
@@ -1251,10 +1219,9 @@ static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state)
    return -ENOSYS;
    return -ENOSYS;
}
}


static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
static size_t adev_get_input_buffer_size(UNUSED_ATTR const struct audio_hw_device *dev,
                                         const struct audio_config *config)
                                         const struct audio_config *config)
{
{
    UNUSED(dev);
    UNUSED(config);
    UNUSED(config);


    FNLOG();
    FNLOG();
@@ -1263,22 +1230,17 @@ static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
}
}


static int adev_open_input_stream(struct audio_hw_device *dev,
static int adev_open_input_stream(struct audio_hw_device *dev,
                                  audio_io_handle_t handle,
                                  UNUSED_ATTR audio_io_handle_t handle,
                                  audio_devices_t devices,
                                  UNUSED_ATTR audio_devices_t devices,
                                  struct audio_config *config,
                                  UNUSED_ATTR struct audio_config *config,
                                  struct audio_stream_in **stream_in,
                                  struct audio_stream_in **stream_in,
                                  audio_input_flags_t flags,
                                  UNUSED_ATTR audio_input_flags_t flags,
                                  const char *address,
                                  UNUSED_ATTR const char *address,
                                  audio_source_t source)
                                  audio_source_t source)
{
{
    struct a2dp_audio_device *a2dp_dev = (struct a2dp_audio_device *)dev;
    struct a2dp_audio_device *a2dp_dev = (struct a2dp_audio_device *)dev;
    struct a2dp_stream_in *in;
    struct a2dp_stream_in *in;
    int ret;
    int ret;
    UNUSED(address);
    UNUSED(config);
    UNUSED(devices);
    UNUSED(flags);
    UNUSED(handle);
    UNUSED(source);
    UNUSED(source);


    FNLOG();
    FNLOG();
@@ -1355,9 +1317,8 @@ static void adev_close_input_stream(struct audio_hw_device *dev,
    DEBUG("done");
    DEBUG("done");
}
}


static int adev_dump(const audio_hw_device_t *device, int fd)
static int adev_dump(UNUSED_ATTR const audio_hw_device_t *device, int fd)
{
{
    UNUSED(device);
    UNUSED(fd);
    UNUSED(fd);


    FNLOG();
    FNLOG();
+11 −15
Original line number Original line Diff line number Diff line
@@ -331,10 +331,9 @@ void bta_ag_disc_acp_res(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_disc_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_disc_fail(tBTA_AG_SCB *p_scb,
                      UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    UNUSED(p_data);

    /* reopen registered servers */
    /* reopen registered servers */
    bta_ag_start_servers(p_scb, p_scb->reg_services);
    bta_ag_start_servers(p_scb, p_scb->reg_services);


@@ -373,10 +372,8 @@ void bta_ag_open_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_rfc_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_rfc_fail(tBTA_AG_SCB *p_scb, UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    UNUSED(p_data);

    /* reinitialize stuff */
    /* reinitialize stuff */
    p_scb->conn_handle = 0;
    p_scb->conn_handle = 0;
    p_scb->conn_service = 0;
    p_scb->conn_service = 0;
@@ -408,12 +405,12 @@ void bta_ag_rfc_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_rfc_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_rfc_close(tBTA_AG_SCB *p_scb,
                      UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    tBTA_AG_CLOSE    close;
    tBTA_AG_CLOSE    close;
    tBTA_SERVICE_MASK services;
    tBTA_SERVICE_MASK services;
    int i, num_active_conn = 0;
    int i, num_active_conn = 0;
    UNUSED(p_data);


    /* reinitialize stuff */
    /* reinitialize stuff */
    p_scb->conn_service = 0;
    p_scb->conn_service = 0;
@@ -640,11 +637,11 @@ void bta_ag_rfc_acp_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_rfc_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_rfc_data(tBTA_AG_SCB *p_scb,
                     UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    uint16_t  len;
    uint16_t  len;
    char    buf[BTA_AG_RFC_READ_MAX];
    char    buf[BTA_AG_RFC_READ_MAX];
    UNUSED(p_data);


    memset(buf, 0, BTA_AG_RFC_READ_MAX);
    memset(buf, 0, BTA_AG_RFC_READ_MAX);


@@ -811,10 +808,10 @@ void bta_ag_post_sco_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_svc_conn_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_svc_conn_open(tBTA_AG_SCB *p_scb,
                          UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    tBTA_AG_CONN evt;
    tBTA_AG_CONN evt;
    UNUSED(p_data);


    if (!p_scb->svc_conn)
    if (!p_scb->svc_conn)
    {
    {
@@ -884,10 +881,9 @@ void bta_ag_ci_rx_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_rcvd_slc_ready(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_rcvd_slc_ready(tBTA_AG_SCB *p_scb,
                           UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    UNUSED(p_data);

    APPL_TRACE_DEBUG("bta_ag_rcvd_slc_ready: handle = %d", bta_ag_scb_to_idx(p_scb));
    APPL_TRACE_DEBUG("bta_ag_rcvd_slc_ready: handle = %d", bta_ag_scb_to_idx(p_scb));


    if (bta_ag_cb.parse_mode == BTA_AG_PASS_THROUGH)
    if (bta_ag_cb.parse_mode == BTA_AG_PASS_THROUGH)
+2 −5
Original line number Original line Diff line number Diff line
@@ -644,11 +644,10 @@ static bool bta_ag_parse_cmer(char *p_s, bool *p_enabled)
                    if idx doesn't exist/1st character of argument is not a digit
                    if idx doesn't exist/1st character of argument is not a digit
**
**
*******************************************************************************/
*******************************************************************************/
static uint8_t bta_ag_parse_chld(tBTA_AG_SCB *p_scb, char *p_s)
static uint8_t bta_ag_parse_chld(UNUSED_ATTR tBTA_AG_SCB *p_scb, char *p_s)
{
{
    uint8_t retval = 0;
    uint8_t retval = 0;
    int16_t idx = -1;
    int16_t idx = -1;
    UNUSED(p_scb);


    if (!isdigit(p_s[0]))
    if (!isdigit(p_s[0]))
    {
    {
@@ -2092,10 +2091,8 @@ void bta_ag_send_bcs(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_send_ring(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_send_ring(tBTA_AG_SCB *p_scb, UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    UNUSED(p_data);

#if (BTA_AG_MULTI_RESULT_INCLUDED == TRUE)
#if (BTA_AG_MULTI_RESULT_INCLUDED == TRUE)
    tBTA_AG_MULTI_RESULT_CB m_res_cb;
    tBTA_AG_MULTI_RESULT_CB m_res_cb;


+2 −4
Original line number Original line Diff line number Diff line
@@ -578,13 +578,11 @@ static void bta_ag_collision_timer_cback(void *data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, uint8_t id,
void bta_ag_collision_cback (UNUSED_ATTR tBTA_SYS_CONN_STATUS status, uint8_t id,
                                    uint8_t app_id, BD_ADDR peer_addr)
                                    UNUSED_ATTR uint8_t app_id, BD_ADDR peer_addr)
{
{
    uint16_t  handle;
    uint16_t  handle;
    tBTA_AG_SCB *p_scb;
    tBTA_AG_SCB *p_scb;
    UNUSED(status);
    UNUSED(app_id);


    /* Check if we have opening scb for the peer device. */
    /* Check if we have opening scb for the peer device. */
    handle = bta_ag_idx_by_bdaddr (peer_addr);
    handle = bta_ag_idx_by_bdaddr (peer_addr);
+6 −8
Original line number Original line Diff line number Diff line
@@ -85,10 +85,10 @@ const tBTA_AG_DATA_CBACK bta_ag_data_cback_tbl[] =
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
static void bta_ag_port_cback(uint32_t code, uint16_t port_handle, uint16_t handle)
static void bta_ag_port_cback(UNUSED_ATTR uint32_t code, uint16_t port_handle,
                              uint16_t handle)
{
{
    tBTA_AG_SCB *p_scb;
    tBTA_AG_SCB *p_scb;
    UNUSED(code);


    if ((p_scb = bta_ag_scb_by_idx(handle)) != NULL)
    if ((p_scb = bta_ag_scb_by_idx(handle)) != NULL)
    {
    {
@@ -188,10 +188,9 @@ static void bta_ag_mgmt_cback(uint32_t code, uint16_t port_handle, uint16_t hand
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
static int bta_ag_data_cback(uint16_t port_handle, void *p_data, uint16_t len, uint16_t handle)
static int bta_ag_data_cback(UNUSED_ATTR uint16_t port_handle, void *p_data,
                             uint16_t len, uint16_t handle)
{
{
    UNUSED(port_handle);

    /* call data call-out directly */
    /* call data call-out directly */
    bta_ag_co_tx_write(handle, (uint8_t *) p_data, len);
    bta_ag_co_tx_write(handle, (uint8_t *) p_data, len);
    return 0;
    return 0;
@@ -394,10 +393,9 @@ void bta_ag_rfc_do_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Returns          void
** Returns          void
**
**
*******************************************************************************/
*******************************************************************************/
void bta_ag_rfc_do_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_rfc_do_close(tBTA_AG_SCB *p_scb,
                         UNUSED_ATTR tBTA_AG_DATA *p_data)
{
{
    UNUSED(p_data);

    if (p_scb->conn_handle) {
    if (p_scb->conn_handle) {
        RFCOMM_RemoveConnection(p_scb->conn_handle);
        RFCOMM_RemoveConnection(p_scb->conn_handle);
    } else {
    } else {
Loading