mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-27 02:40:40 +00:00
modify x86 compilation issues
Signed-off-by: xwh <jiewenhao@huawei.com>
This commit is contained in:
parent
d5ac559a2f
commit
3efd5e7448
@ -390,9 +390,9 @@ static unsigned char ConvertAdvFilter(unsigned char advFilter)
|
||||
static void ConvertAdvData(const SoftBusBleAdvData *src, StartAdvRawData *dst)
|
||||
{
|
||||
dst->advDataLen = src->advLength;
|
||||
dst->advData = (unsigned char *)src->advData;
|
||||
dst->advData = src->advData;
|
||||
dst->rspDataLen = src->scanRspLength;
|
||||
dst->rspData = (unsigned char *)src->scanRspData;
|
||||
dst->rspData = src->scanRspData;
|
||||
}
|
||||
|
||||
static void ConvertAdvParam(const SoftBusBleAdvParams *src, BleAdvParams *dst)
|
||||
|
@ -86,9 +86,9 @@ typedef enum {
|
||||
|
||||
typedef struct {
|
||||
unsigned short advLength;
|
||||
char *advData;
|
||||
unsigned char *advData;
|
||||
unsigned short scanRspLength;
|
||||
char *scanRspData;
|
||||
unsigned char *scanRspData;
|
||||
} SoftBusBleAdvData;
|
||||
|
||||
typedef struct {
|
||||
|
@ -677,12 +677,12 @@ static int32_t BuildBleConfigAdvData(SoftBusBleAdvData *advData, const Broadcast
|
||||
if (advData == NULL || broadcastData == NULL) {
|
||||
return SOFTBUS_INVALID_PARAM;
|
||||
}
|
||||
advData->advData = (char *)SoftBusCalloc(ADV_DATA_MAX_LEN + ADV_HEAD_LEN);
|
||||
advData->advData = (unsigned char *)SoftBusCalloc(ADV_DATA_MAX_LEN + ADV_HEAD_LEN);
|
||||
if (advData->advData == NULL) {
|
||||
DLOGE("malloc failed");
|
||||
return SOFTBUS_MALLOC_ERR;
|
||||
}
|
||||
advData->scanRspData = (char *)SoftBusCalloc(RESP_DATA_MAX_LEN + RSP_HEAD_LEN);
|
||||
advData->scanRspData = (unsigned char *)SoftBusCalloc(RESP_DATA_MAX_LEN + RSP_HEAD_LEN);
|
||||
if (advData->scanRspData == NULL) {
|
||||
DLOGE("malloc failed");
|
||||
SoftBusFree(advData->advData);
|
||||
|
@ -450,9 +450,9 @@ HWTEST_F(AdapterBleGattTest, AdvertiseLifecycle, TestSize.Level3)
|
||||
0x18, 0x33, 0x39, 0x36, 0x62, 0x33, 0x61, 0x33, 0x31, 0x21, 0x00, 0x02, 0x0A, 0xEF};
|
||||
const unsigned char scanRspDataExample[] = {0x03, 0xFF, 0x7D, 0x02};
|
||||
SoftBusBleAdvData data = {.advLength = sizeof(advDataExample),
|
||||
.advData = (char *)advDataExample,
|
||||
.advData = (unsigned char *)advDataExample,
|
||||
.scanRspLength = sizeof(scanRspDataExample),
|
||||
.scanRspData = (char *)scanRspDataExample};
|
||||
.scanRspData = (unsigned char *)scanRspDataExample};
|
||||
ASSERT_EQ(SoftBusSetAdvData(advId, &data), SOFTBUS_OK);
|
||||
ASSERT_TRUE(advDataCtx.Expect(advId, SOFTBUS_BT_STATUS_SUCCESS));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user