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

Commit b67e1816 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Chih-hung Hsieh
Browse files

Fix misc-macro-parentheses warnings

When compiled with WITH_TIDY=1, clang-tidy warns about
missing parameters around macro parameters.

Bug: 28705665
Change-Id: I89c23cfe6eaefae5ef3c648a7c123c0501662c13
parent db236920
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ enum
#define BTA_AV_NUM_LINKS            AVDT_NUM_LINKS

#define BTA_AV_CO_ID_TO_BE_STREAM(p, u32) {*(p)++ = (UINT8)((u32) >> 16); *(p)++ = (UINT8)((u32) >> 8); *(p)++ = (UINT8)(u32); }
#define BTA_AV_BE_STREAM_TO_CO_ID(u32, p) {u32 = (((UINT32)(*((p) + 2))) + (((UINT32)(*((p) + 1))) << 8) + (((UINT32)(*(p))) << 16)); (p) += 3;}
#define BTA_AV_BE_STREAM_TO_CO_ID(u32, p) {(u32) = (((UINT32)(*((p) + 2))) + (((UINT32)(*((p) + 1))) << 8) + (((UINT32)(*(p))) << 16)); (p) += 3;}

/* these bits are defined for bta_av_cb.multi_av */
#define BTA_AV_MULTI_AV_SUPPORTED   0x01
+4 −4
Original line number Diff line number Diff line
@@ -584,18 +584,18 @@ static void bta_hf_client_handle_btrh( UINT16 code)
/* Check if prefix match and skip spaces if any */
#define AT_CHECK_EVENT(buf, event) \
    if (strncmp("\r\n"event, buf,sizeof("\r\n"event) - 1) != 0) return buf; \
    buf += sizeof("\r\n"event) - 1; \
    while (*buf == ' ') buf++;
    (buf) += sizeof("\r\n"event) - 1; \
    while (*(buf) == ' ') (buf)++;

/* check for <cr><lf> and forward buffer if match */
#define AT_CHECK_RN(buf) \
    if (strncmp("\r\n", buf, sizeof("\r\n") - 1) != 0) { \
        APPL_TRACE_DEBUG("%s missing end <cr><lf>", __FUNCTION__); \
        return NULL;} \
    buf += sizeof("\r\n") - 1;
    (buf) += sizeof("\r\n") - 1;

/* skip rest of AT string up to <cr> */
#define AT_SKIP_REST(buf) while(*buf != '\r') buf++;
#define AT_SKIP_REST(buf) while(*(buf) != '\r') (buf)++;

static char *bta_hf_client_parse_ok(char *buffer)
{
+1 −1
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@ extern tBTA_HL_CB *bta_hl_cb_ptr;
#define BTA_HL_GET_MDEP_CFG_PTR(app_idx, mdep_cfg_idx)  &(bta_hl_cb.acb[(app_idx)].sup_feature.mdep[mdep_cfg_idx].mdep_cfg)
#define BTA_HL_GET_DATA_CFG_PTR(app_idx, mdep_cfg_idx, data_cfg_idx)  \
           &(bta_hl_cb.acb[(app_idx)].sup_feature.mdep[mdep_cfg_idx].mdep_cfg.data_cfg[data_cfg_idx])
#define BTA_HL_GET_BUF_PTR(p_pkt) ((UINT8 *)((UINT8 *) (p_pkt+1) + p_pkt->offset))
#define BTA_HL_GET_BUF_PTR(p_pkt) ((UINT8 *)((UINT8 *) ((p_pkt)+1) + (p_pkt)->offset))

/*****************************************************************************
**  Function prototypes
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ typedef UINT8 tBTA_AV_HNDL;
#define BTA_AV_HNDL_TO_MSK(h)       ((UINT8)(1 << (h)))

/* tBTA_AV_HNDL to mask */
#define BTA_AV_HNDL_TYPE_TO_MSK(h)  ((UINT8)(1 << (h&BTA_AV_HNDL_MSK)))
#define BTA_AV_HNDL_TYPE_TO_MSK(h)  ((UINT8)(1 << ((h)&BTA_AV_HNDL_MSK)))

/* offset of codec type in codec info byte array */
#define BTA_AV_CODEC_TYPE_IDX       AVDT_CODEC_TYPE_INDEX   /* 2 */
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ typedef UINT16 tBTA_HH_EVT;
#define BTA_HH_APP_ID_LE            0xff

/* defined the minimum offset */
#define BTA_HH_MIN_OFFSET       L2CAP_MIN_OFFSET+1
#define BTA_HH_MIN_OFFSET       (L2CAP_MIN_OFFSET+1)

/* HID_HOST_MAX_DEVICES can not exceed 15 for th design of BTA HH */
#define BTA_HH_IDX_INVALID      0xff
Loading